English
Forum

"Example benötigte Entries not delete

 

Torsten
Rümker
Hi,

The following is my trouble:
I have several programs prepares, which in the Registry under HKEY_Current_UserSoftware a Haupteintrag share.
means:
HKEY_Current_UserSoftwareTRSoftwareProgramm1
HKEY_Current_UserSoftwareTRSoftwareProgramm2
etc.

If I now one Program deinstalliere should it naturally its Spuren from the Registry with Remove.
only, How Verify I sure ex, the still one Another Key under TRSoftware present is, so I the entry only Lösche if it too really possible/necessary is?

I have already verschiedenes ausprobiert (z.b. one Sign in the vermerkt is How many programs Entries having) but I have yet nothing hinbekommen, what sure functions.

for each Info grateful
Torsten
 
Ich lerne, ob ich will oder nicht!
Betriebssystem:
- Ubuntu 15.x
- Windows (diverse)
XProfan Version: X2
09/30/06  
 




Michael
Wodrich
HKEY_Current_UserSoftwareTRSoftwareProgramm1

really functions the still lovely. under TRSoftware can You still not only Unterschlüssel create. set you there a Key there, the as an Stringliste functions:
installs = Program1, Program2

After Deinstallation of Program1 take You whom Key, entfernst whom suitable Unterschlüssel-names and know then: I see, there's yet what.

I experimentiere straight with the Delete: ADVAPI has a Löschfunktion and SHLWAPI has even a whole battery of suitable functions. time see what draus becomes.

Best wishes
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
09/30/06  
 



[quote:f5bb95ce4d=Torsten Rümker]only, How Verify I sure ex, the still one Another Key under TRSoftware present is, so I the entry only Lösche if it too really possible/necessary is?
[/quote:f5bb95ce4d]
with RegQueryInfoKey?
CompileMarkSeparation
Def @RegQueryInfoKey(12) !"ADVAPI32","RegQueryInfoKeyA"
Declare CLASS#,ClassSize&,SubKeys&,Greatest&,MaxClassLen&
Declare Values&,MaxValueNameLen&,MaxValueLen&,SecDescLänge&,FileTime#
Declare Fehler&
Dim Class#,261
DIM FileTime#,8
LET ClassSize&=261
Let Fehler&=@RegQueryInfoKey($80000001,Class#,@ADDR(ClassSize&),0,@ADDR(SubKeys&),@ADDR(Greatest&),@ADDR(MaxClassLen&),@ADDR(Values&),@ADDR(MaxValueNameLen&),@ADDR(MaxValueLen&),@ADDR(SecDescLänge&),FileTime#)
ADDSTRING "Rückgabe von RegQueryInfoKey="+@STR$(Fehler&)
ADDSTRING "Klassenname="+@String$(CLASS#,0)
ADDSTRING "Länge des Klassennamens="+@STR$(ClassSize&)
ADDSTRING "Anzahl der Unterschlüssel="+@STR$(SubKeys&)
ADDSTRING "Länge des größten Unterschlüssels="+@STR$(Greatest&)
ADDSTRING "Länge des größten Klassennamens="+@STR$(MaxClassLen&)
ADDSTRING "Anzahl der Werte im Schlüssel="+@STR$(Values&)
ADDSTRING "Länge des größten Wertenamens="+@STR$(MaxValueNameLen&)
ADDSTRING "Länge des größten Wertes="+@STR$(MaxValueLen&)
ADDSTRING "Länge des Security Descriptors="+@STR$(SecDescLänge&)
Dispose FileTime#
Dispose CLASS#
@EDITBOX("Rückgaben",1ss=s2>)

Greeting

Andreas
 
09/30/06  
 



... alas Yes, and the had I there too yet anzubieten:
CompileMarkSeparation
Def @RegOpenKeyEx(5) !"ADVAPI32","RegOpenKeyExA"
Def @RegEnumKey(4) !"ADVAPI32","RegEnumKeyA"
Def @RegCloseKey(1) !"ADVAPI32","RegCloseKey"
Def @InitCommonControls(0) !"COMCTL32","InitCommonControls"
Def @RegQueryInfoKey(12) !"ADVAPI32","RegQueryInfoKeyA"
DEF @GetSysColor(1) !"USER32","GetSysColor"
@InitCommonControls()
Declare CLASS#,ClassSize&,SubKeys&,Greatest&,MaxClassLen&
Declare Values&,MaxValueNameLen&,MaxValueLen&,SecDescLänge&,FileTime#
Declare Fehler&,CL_NAME&
Declare hImageList&,hIcon&,Executehandle&,Root1&,ROOT&[2,3,10],ROOT11&
Declare Imagelist&,TV_INSERT#,TV_TEXT#,TV_ITEM#,REG_KEY$,REG_ROOT$,REG_ERGEBNIS$
Declare Unterlage7&,TV_ITEM_HANDLE&,TV_ITEM_HANDLE2&
Declare REG_ERGEBNIS#,REG_ERROR&,REG_HANDLE&
Declare REG_Zähler%,TV_ITEM_HANDLE1&
Declare CL_Länge&,SK_ANZAHL&,SK_Länge&,CL_LängeMax&,W_Anzahl&
Declare WN_Länge&,W_Länge&,SecDesc_Länge&
Dim TV_TEXT#,261
DIM REG_ERGEBNIS#,261
Declare TreeView&
DIM TV_INSERT#,48
DIM TV_ITEM#,40

PROC TVINSERT

    String TV_TEXT#,0=@$(2)      Der Text im Label
    long TV_INSERT#,0=@&(1)          TVins-Parent
    long TV_INSERT#,8=$0001
    long TV_INSERT#,24=TV_TEXT#   Adress of Label

ENDPROC

Windowstyle 31+512
Window 10,50-600,420
Windowtitle "Infos über Registrykeys auslesen"
settruecolor 1
cls @GETSYSCOLOR(15)
LET Unterlage7&=@Control("Dialog","",$40000000+$10000000,10,50,600,320,%HWND,3,%HINSTANCE)
Let TreeView&=@control("SysTreeView32","",$40000000+$10000000+$800000+$200000+$0002+$0010+$0020,40,20,250,300,Unterlage7&,200,%Hinstance)
@sendmessage(TreeView&,$1109,0,Imagelist&) Associate the image list with the tree
LET CL_NAME&=@Createtext(%HWND,"Klassenname=",310,50,400,30)
LET CL_Länge&=@Createtext(%HWND,"Länge des Klassennamens=",310,85,400,30)
LET SK_ANZAHL&=@Createtext(%HWND,"Anzahl der Unterschlüssel=",310,190,400,30)
LET SK_LÄNGE&=@Createtext(%HWND,"Läng des größten Unterschlüssels=",310,155,400,30)
LET CL_LängeMax&=@Createtext(%HWND,"Länge des längsten Klassennamens=",310,120,400,30)
LET W_Anzahl&=@Createtext(%HWND,"Anzahl der Werte im Schlüssel=",310,225,400,30)
LET WN_Länge&=@Createtext(%HWND,"Länge des größten Wertenamens=",310,260,400,30)
LET W_Länge&=@Createtext(%HWND,"Länge des größten Wertes=",310,295,400,30)
LET SecDesc_Länge&=@Createtext(%HWND,"Länge des Security Descriptors=",310,330,400,30)
@Sendmessage(Treeview&,$111D,0,@RGB(255,255,220))
@Sendmessage(Treeview&,$111E,0,@RGB(255,70,100))
TVINSERT 0,"HKEY_LOCAL_MACHINE",$0010
@sendmessage(Treeview&,$1100,0,TV_INSERT#)
TVINSERT 0,"HKEY_USERS",$0010
@sendmessage(Treeview&,$1100,0,TV_INSERT#)
CLEAR TV_ITEM#,TV_TEXT#

While %MENUITEM<>-2

    Sleep 100
    LET TV_ITEM_HANDLE1&=@sendmessage(Treeview&,$110A,$0009,0)

    IF TV_ITEM_HANDLE1&<>TV_ITEM_HANDLE&

        Enablewindow Treeview&,0
        Usecursor 2
        LET REG_KEY$=""
        LET REG_ROOT$=""
        LET TV_ITEM_HANDLE&=TV_ITEM_HANDLE1&
        CLEAR TV_ITEM#,TV_TEXT#
        LONG TV_ITEM#,0=$11
        LONG TV_ITEM#,20=261
        LONG TV_ITEM#,16=TV_TEXT#
        LONG TV_ITEM#,4=TV_ITEM_HANDLE&
        @sendmessage(Treeview&,$110C,0,TV_ITEM#)
        LET REG_KEY$=@STRING$(TV_TEXT#,0)
        LET TV_ITEM_HANDLE2&=TV_ITEM_HANDLE&

        While TV_ITEM_HANDLE2&<>0

            LET TV_ITEM_HANDLE2&=@sendmessage(Treeview&,$110A,$3,TV_ITEM_HANDLE2&)

            IF TV_ITEM_HANDLE2&<>0

                CLEAR TV_ITEM#,TV_TEXT#
                LONG TV_ITEM#,0=$11
                LONG TV_ITEM#,20=261
                LONG TV_ITEM#,16=TV_TEXT#
                LONG TV_ITEM#,4=TV_ITEM_HANDLE2&
                @sendmessage(Treeview&,$110C,0,TV_ITEM#)
                LET REG_KEY$=""+REG_KEY$
                LET REG_KEY$=@STRING$(TV_TEXT#,0)+REG_KEY$

            endif

        wend

        LET REG_ROOT$=@SubStr$(REG_KEY$,1,"")

        IF REG_ROOT$<>""

            LET REG_KEY$=@TRANSLATE$(REG_KEY$,REG_ROOT$,"")
            CASE LEFT$(REG_KEY$,1)="" : LET REG_KEY$=@RIGHT$(REG_KEY$,@LEN(REG_KEY$)-1)

        else

            LET REG_ROOT$=REG_KEY$
            LET REG_KEY$=""

        endif

        While @sendmessage(Treeview&,$110A,$4,TV_ITEM_HANDLE&)<>0

            LET TV_ITEM_HANDLE2&=@sendmessage(Treeview&,$110A,$4,TV_ITEM_HANDLE&)
            @Sendmessage(Treeview&,$1101,0,TV_ITEM_HANDLE2&)

        wend

        IF REG_ROOT$="HKEY_USERS"

            LET REG_Error&=@RegOpenKeyEx($80000003,@addr(REG_Key$),0,$20019,@addr(REG_Handle&))

        Elseif REG_ROOT$="HKEY_LOCAL_MACHINE"

            LET REG_Error&=@RegOpenKeyEx($80000002,@addr(REG_Key$),0,$20019,@addr(REG_Handle&))

        else

            LET REG_Error&=2

        endif

        LET REG_ZÄHLER%=0

        whilenot REG_Error&

            LET REG_Error&=@RegEnumKey(REG_Handle&,REG_Zähler%,REG_Ergebnis#,261)

            IF REG_Error&=0

                LET REG_ERGEBNIS$=@string$(REG_Ergebnis#,0)
                TVINSERT TV_ITEM_HANDLE&,REG_ERGEBNIS$,$0010
                @sendmessage(Treeview&,$1100,0,TV_INSERT#)

            endif

            inc REG_Zähler%

        wend

        Dim Class#,261
        DIM FileTime#,8
        LET ClassSize&=261
        Let Fehler&=@RegQueryInfoKey(REG_Handle&,Class#,@ADDR(ClassSize&),0,@ADDR(SubKeys&),@ADDR(Greatest&),@ADDR(MaxClassLen&),@ADDR(Values&),@ADDR(MaxValueNameLen&),@ADDR(MaxValueLen&),@ADDR(SecDescLänge&),FileTime#)
        Settext CL_NAME&,"Klassenname="+@String$(CLASS#,0)
        Settext CL_Länge&,"Länge des Klassennamens="+@STR$(ClassSize&)
        Settext SK_ANZAHL&,"Anzahl der Unterschlüssel="+@STR$(SubKeys&)
        Settext SK_Länge&,"Länge des größten Unterschlüssels="+@STR$(Greatest&)
        Settext CL_LängeMax&,"Länge des größten Klassennamens="+@STR$(MaxClassLen&)
        Settext W_Anzahl&,"Anzahl der Werte im Schlüssel="+@STR$(Values&)
        Settext WN_Länge&,"Länge des größten Wertenamens="+@STR$(MaxValueNameLen&)
        Settext W_Länge&,"Länge des größten Wertes="+@STR$(MaxValueLen&)
        Settext SecDesc_Länge&,"Länge des Security Descriptors="+@STR$(SecDescLänge&)
        Dispose FileTime#
        Dispose CLASS#
        @RegCloseKey(REG_Handle&)
        @Sendmessage(Treeview&,$1113,0,TV_ITEM_HANDLE&)
        Usecursor 0
        Enablewindow Treeview&,1

    endif

    DRAWTEXT 0,0,"REG_ROOT$="+REG_ROOT$+@SPACE$(255)
    DRAWTEXT 0,20,"REG_KEY$="+REG_KEY$+@SPACE$(255)

WEND

Dispose TV_ITEM#
Dispose TV_TE
class=s4 href='./../../function-references/XProfan/dispose/'>DISPOSE TV_INSERT# Dispose REG_ERGEBNIS#
 
09/30/06  
 




Michael
Wodrich
Have 2 extensions undertaken:
CompileMarkSeparation
!
Tvinsert 0,"HKEY_CLASSES_ROOT",$0010
@Sendmessage(Treeview&,$1100,0,Tv_insert#)
Tvinsert 0,"HKEY_CURRENT_USER",$0010
@Sendmessage(Treeview&,$1100,0,Tv_insert#)
Tvinsert 0,"HKEY_LOCAL_MACHINE",$0010
@Sendmessage(Treeview&,$1100,0,Tv_insert#)
Tvinsert 0,"HKEY_USERS",$0010
@Sendmessage(Treeview&,$1100,0,Tv_insert#
n>

and
CompileMarkSeparation
!

If Reg_root$="HKEY_USERS"

    Let Reg_error&=@Regopenkeyex($80000003,@Addr(Reg_key$),0,$20019,@Addr(Reg_handle&))

Elseif Reg_root$="HKEY_CURRENT_USER"

    Let Reg_error&=@Regopenkeyex($80000001,@Addr(Reg_key$),0,$20019,@Addr(Reg_handle&))

Elseif Reg_root$="HKEY_CLASSES_ROOT"

    Let Reg_error&=@Regopenkeyex($80000000,@Addr(Reg_key$),0,$20019,@Addr(Reg_handle&))

Elseif Reg_root$="HKEY_LOCAL_MACHINE"

    Let Reg_error&=@Regopenkeyex($80000002,@Addr(Reg_key$),0,$20019,@Addr(Reg_handle&))

Else

    Let Reg_error&=2

Endif


can I in the momentum well use, thanks.

with Classes_Root kanns one Weilchen last. by me counts it over 8000 Unterschlüssel.

nice Regards
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
09/30/06  
 



whether one The need, is Ansichtssache...
 
09/30/06  
 




Torsten
Rümker
Jau, so should it weg.

even very simply, over The Number of Unterschlüssel.
If amount Unterschlüssel = 0 then wech with TRSoftware

thanks you.

MfG
Torsten
 
Ich lerne, ob ich will oder nicht!
Betriebssystem:
- Ubuntu 15.x
- Windows (diverse)
XProfan Version: X2
09/30/06  
 




Michael
Wodrich
me was the local_user important, there there under software most programs verewigt are.
 
Programmieren, das spannendste Detektivspiel der Welt.
09/30/06  
 



be MInimalist - is under HKEY_USERS with the string SID the jeweiligen Users auslesbar...
 
09/30/06  
 




Torsten
Rümker
so Have now no patience More.
APIs find I Real straining.
I mach for today schluß and drive my sister visit.

tommorrow denk I once more drüber to How I the for me umgemodelt get

MfG
Torsten
 
Ich lerne, ob ich will oder nicht!
Betriebssystem:
- Ubuntu 15.x
- Windows (diverse)
XProfan Version: X2
09/30/06  
 




Torsten
Rümker
[quote:418f29a759=Andreas Hötker]be MInimalist - is under HKEY_USERS with the string SID the jeweiligen Users auslesbar...[/quote:418f29a759]
Ähöm, for a Minimalisten write You but integrally beautiful aufwändige Beispielcodes

but time in the serious.

could you me time one Minimal-example create, with the I The spending your Source code for a designed Key (which is me alike) get?
sincere said smoking me the head, I
a) what APIs angeht somehow begriffsstutzig be
and
b) Since I it yet never really for something use could so did i so my Problems with the Treeview have

OK, the are sincere said not really The best Reasons, but I go rather step for step to if I what new learn.
means first the I acutely use could and later then The Extras

would be Real nice

MfG
Torsten
 
Ich lerne, ob ich will oder nicht!
Betriebssystem:
- Ubuntu 15.x
- Windows (diverse)
XProfan Version: X2
09/30/06  
 




Jörg
Sellmeyer
have You Prfellow? there Gibts into Vorlagen nice Examples of Uwe Pascal Niemeyer.
You can it you of [...]  herunterladen.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
10/01/06  
 




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.913 Views

Untitledvor 0 min.

Themeninformationen



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