Shadowpp Posted October 5, 2006 Posted October 5, 2006 (edited) My golas are: 1) Enumerate the registry (where specified) and populate $GUID with the subkeys 2) Populate $APPNAME with the value of "DM" in each of the above subkeys 3) Display all the $APPNAME values in $Combo1 minus everything after the first "." 4) After the button is clicked, delete all instances of the key in the entire registry My known problems are: 1) Each machine will have an unknown number of subkeys to enumerate 2) How to input the $APPNAME data into the dropdown 2) Delete the $GUID key associated with the $APPNAME chosen in the list from the registry Here is what I have so far #NoTrayIcon #include <File.au3> #include <GUIConstants.au3> Opt("RunErrorsFatal", 0) For $i= 1 to 10 ;the stop number entered must be variable $GUID = RegEnumKey ("HKEY_LOCAL_MACHINE\SOFTWARE\NetWare\NAL\1.0\Distribute\TEST", $i) If @error <> 0 then ExitLoop $APPNAME = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\NetWare\NAL\1.0\Distribute\TEST\" & $GUID, "DN") Next $Form1 = GUICreate("GUID Remover", 448, 200, -1, -1) GUICtrlCreateLabel("Please select the application you want to remove", 30, 24, 380, 25, $SS_CENTER) GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman") GUICtrlCreateLabel("Application List", 136, 64, 153, 28, $SS_CENTER) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") $Combo1 = GUICtrlCreateCombo("", 112, 100, 217, 21) GUICtrlSetData(-1, "") ; this is where I think the list of $APPNAME data should go GUICtrlSetState(-1, $GUI_FOCUS) $Button1 = GUICtrlCreateButton("Remove Application", 144, 130, 153, 25, 0) GUICtrlCreateLabel("Click button to remove selected application", 112, 160, 207, 17) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 ;logic to delete all occurances of the $GUID here EndSelect WEnd Exit Sample of the registry data: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\NetWare\NAL\1.0\Distribute\TEST] [HKEY_LOCAL_MACHINE\SOFTWARE\NetWare\NAL\1.0\Distribute\TEST\05C9CB75-4697-498C-B7AB-974C810D3169] "Version"="HVER3" "LastRun"=dword:4513208f "DN"="Enable_Access2003.APPS.XP.DT.PTL.AZ.Tosco" [HKEY_LOCAL_MACHINE\SOFTWARE\NetWare\NAL\1.0\Distribute\TEST\35D42B38-1BBC-4943-A435-B78E35D9CC50] "Version"="HVER2" "LastRun"=dword:4512cf62 "DN"="UninstallMSI.APPS.XP.DT.PTL.AZ.Tosco" [HKEY_LOCAL_MACHINE\SOFTWARE\NetWare\NAL\1.0\Distribute\TEST\44984FD9-BD14-4A6B-9D19-4F9D83BEFF8D] "Version"="HVER5" "LastRun"=dword:45217d40 "DN"="SQL_Server_ODBC_DSNs_UR.APPS.XP.DT.PAP.AZ.Tosco" Thanks for your assitance!! Edited October 5, 2006 by Shadowpp
PsaltyDS Posted October 5, 2006 Posted October 5, 2006 My golas are:1) Enumerate the registry (where specified) and populate $GUID with the subkeys 2) Populate $APPNAME with the value of "DM" in each of the above subkeys3) Display all the $APPNAME values in $Combo1 minus everything after the first "."4) After the button is clicked, delete all instances of the key in the entire registryMy known problems are:1) Each machine will have an unknown number of subkeys to enumerate2) How to input the $APPNAME data into the dropdown2) Delete the $GUID key associated with the $APPNAME chosen in the list from the registryHere is what I have so farThanks for your assitance!!As one part of that, you might get some ideas from my _RegSearch() function. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Shadowpp Posted October 5, 2006 Author Posted October 5, 2006 Thanks, I will examine your script, tho I can perform the search easily enough...my immediate problems are: 1 - How to determine the the number of subkeys present to update the stop value of the FOR loop properly 2 - stick the resulting $APPNAME data into the dropdown window
PsaltyDS Posted October 6, 2006 Posted October 6, 2006 Thanks, I will examine your script, tho I can perform the search easily enough...my immediate problems are: 1 - How to determine the the number of subkeys present to update the stop value of the FOR loop properly 2 - stick the resulting $APPNAME data into the dropdown window One of the reasons I mentioned my _RegSearch() is that the ouput distinguishes between keys, values, and data. So you can pull only what you want from the resulting string. Once you have extracted what you want from to a properly formatted string, with "|" seperators, stick it in there with: GuiCtrlSetData($Combo1, $AppNameList) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now