English
Forum

Registry-Key Verify...

 

ASKTEC
Hello together,

how can I under XProfan Verify, whether a Registry-Key present or not? ReadIni bring Yes a Error Message, if the Key No is...

Vielen Thanks for Your Help...

Greeting

Andreas
 
Profan 7.6 / XProfan 8 / XProfan 9 ~ W2k Prof. / Win XP Prof. ~ AMD XP2000+ / P4 3.80 GHz
12/08/05  
 



as Administrator should the always so weg:
CompileMarkSeparation
Def @RegOpenKeyEx(5) !"ADVAPI32","RegOpenKeyExA"
Def @RegCloseKey(1) !"ADVAPI32","RegCloseKey"
Declare Oberschlüssel$,Oberschlüssel&,Key$,Vorhanden&
Declare KEY_HANDLE&
Windowstyle 31
Windowtitle "Registryschlüssel vorhanden??"
Window 0,0-640,440
LET Oberschlüssel$=" "

WHILE Oberschlüssel$<>""

    LET Oberschlüssel$=@INPUT$("Oberschlüssel eingeben","Existiert Schlüssel?","HKEY_LOKAL_MACHINE")

    IF Oberschlüssel$<>""

        LET KEY$=@INPUT$("Oberschlüssel eingeben","Existiert Schlüssel?","Software")

        IF Oberschlüssel$="HKEY_LOKAL_MACHINE"

            LET Oberschlüssel&=$80000002

        ElseIF Oberschlüssel$="HKEY_CLASSES_ROOT"

            LET Oberschlüssel&=$80000000

        ElseIF Oberschlüssel$="HKEY_CURRENT_CONFIG"

            LET Oberschlüssel&=$80000005

        ElseIF Oberschlüssel$="HKEY_CURRENT_USER"

            LET Oberschlüssel&=$80000001

        ElseIF Oberschlüssel$="HKEY_USERS"

            LET Oberschlüssel&=$80000003

        ElseIF Oberschlüssel$="HKEY_DYN_DATA"

            LET Oberschlüssel&=$80000006

        ElseIF Oberschlüssel$="HKEY_PERFORMANCE_DATA"

            LET Oberschlüssel&=$80000004

        endif

        LET VORHANDEN&=@RegOpenKeyEx(Oberschlüssel&,@ADDR(KEY$),0,$40000,@ADDR(KEY_HANDLE&))

        IF VORHANDEN&=0

            PRINT "Schlüssel "+Oberschlüssel$+""+Key$+" ist vorhanden!"
            @RegCloseKey(KEY_HANDLE&)

        elseIF VORHANDEN&=2

            PRINT "Schlüssel "+Oberschlüssel$+""+Key$+" ist nicht vorhanden!"

        Else

            PRINT "Über Schlüssel "+Oberschlüssel$+""+Key$+" kann ich keine Aussage treffen!"

        endif

    endif

s4 href='./../../function-references/XProfan/wend/'>wend


I look but once more very to...
 
12/09/05  
 



small Fehlerkorrektur (leg me same sleep)
CompileMarkSeparation
Def @RegOpenKeyEx(5) !"ADVAPI32","RegOpenKeyExA"
Def @RegCloseKey(1) !"ADVAPI32","RegCloseKey"
Declare Oberschlüssel$,Oberschlüssel&,Key$,Vorhanden&
Declare KEY_HANDLE&
Windowstyle 31
Windowtitle "Registryschlüssel vorhanden??"
Window 0,0-640,440
LET Oberschlüssel$=" "

WHILE Oberschlüssel$<>""

    LET Oberschlüssel$=@INPUT$("Oberschlüssel eingeben","Existiert Schlüssel?","HKEY_LOKAL_MACHINE")

    IF Oberschlüssel$<>""

        LET KEY$=@INPUT$("Oberschlüssel eingeben","Existiert Schlüssel?","Software")

        IF Oberschlüssel$="HKEY_LOKAL_MACHINE"

            LET Oberschlüssel&=$80000002

        ElseIF Oberschlüssel$="HKEY_CLASSES_ROOT"

            LET Oberschlüssel&=$80000000

        ElseIF Oberschlüssel$="HKEY_CURRENT_CONFIG"

            LET Oberschlüssel&=$80000005

        ElseIF Oberschlüssel$="HKEY_CURRENT_USER"

            LET Oberschlüssel&=$80000001

        ElseIF Oberschlüssel$="HKEY_USERS"

            LET Oberschlüssel&=$80000003

        ElseIF Oberschlüssel$="HKEY_DYN_DATA"

            LET Oberschlüssel&=$80000006

        ElseIF Oberschlüssel$="HKEY_PERFORMANCE_DATA"

            LET Oberschlüssel&=$80000004

        ELSE

            LET Oberschlüssel&=0

        endif

        LET VORHANDEN&=@RegOpenKeyEx(Oberschlüssel&,@ADDR(KEY$),0,$40000,@ADDR(KEY_HANDLE&))

        IF VORHANDEN&=0

            PRINT "Schlüssel "+Oberschlüssel$+""+Key$+" ist vorhanden!"
            @RegCloseKey(KEY_HANDLE&)

        elseIF VORHANDEN&=2

            PRINT "Schlüssel "+Oberschlüssel$+""+Key$+" ist nicht vorhanden!"

        Elseif VORHANDEN&=6

            PRINT "Schlüssel "+Oberschlüssel$+""+Key$+" ist nicht vorhanden!"

        Elseif VORHANDEN&=1010

            PRINT "Schlüssel "+Oberschlüssel$+""+Key$+" ist nicht vorhanden!"

        elseif VORHANDEN&=5

            PRINT "Schlüssel "+Oberschlüssel$+""+Key$+" ist vorhanden!"

        else

            PRINT "Über Schlüssel "+Oberschlüssel$+""+Key$+" kann ich keine Aussage treffen!",VORHANDEN&

        endif

    wend

 
12/09/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.283 Views

Untitledvor 0 min.
E.T.01/14/24
H.Brill05/21/23
p.specht02/20/19
Rainer Hoefs12/28/15
More...

Themeninformationen

this Topic has 2 subscriber:

unbekannt (2x)
ASKTEC (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie