NerdFencer Posted April 9, 2009 Share Posted April 9, 2009 (edited) Here is an uninstaller tool that I put together. Amusingly it is faster than the built in windows one.FeaturesBasic List of Programs to UninstallRenaming of Uninstall ReferencesRemoval of Uninstall ReferencesName Filtering EX: can show only programs with windows in the nameExtra info available for entriesChanges in Version 2:-Added #RequireAdmin-Fixed crashing bug-Added support for multi-digit icon indexes*Edit: Added Source*Edit 2: Updated Source and added the Icon that I used in my compiled version, which I removedDownloads of Previous Version: 22Uninstall_Tool.au3Icon.ico Edited April 9, 2009 by NerdFencer _________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell Link to comment Share on other sites More sharing options...
rajeshontheweb Posted April 9, 2009 Share Posted April 9, 2009 nice one, as i have seen, windows uninstaller / appwiz control panel is the slowest on earth !!! anyother uninstaller is supposed to be fast !!! donno probably windows interface just takes tooo much information into it :-) Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
gseller Posted April 9, 2009 Share Posted April 9, 2009 I have tried both the exe and the au3 file and both give me the error _GUIImageList_AddIcon:-1 Link to comment Share on other sites More sharing options...
Authenticity Posted April 9, 2009 Share Posted April 9, 2009 (edited) Your script assume few things incorrectly. If you get an icon path as:C:\Program File\AutoIt v3\AutoItv3.exe,33then, because your script assume that only If StringLeft(StringRight($icon,2),1)=="," Then.., otherwise it's assumed that it's an icon path or something but this icon path doesn't exist.Edit: gseller, try #RequireAdmin. Edited April 9, 2009 by Authenticity Link to comment Share on other sites More sharing options...
snowman533 Posted April 9, 2009 Share Posted April 9, 2009 (edited) error recorded this with a error recording program of mine window_error_log.txt Edited April 9, 2009 by snowman533 Intermediate AutoIt/Autohotkey User Link to comment Share on other sites More sharing options...
NerdFencer Posted April 9, 2009 Author Share Posted April 9, 2009 Thanks for all the feedback I have updated the original post with new code to address the issues that were pointed out. In fixing Authenticity's incorrect assumption, I was able to get the error that snowman533 and gseller had been encountering. I think I fixed it, but it would be great if one or both of you could try the new version to make sure, that would be great. _________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell Link to comment Share on other sites More sharing options...
gseller Posted April 9, 2009 Share Posted April 9, 2009 Ok, I re downloaded your corrected code and icon and I am admin and still get the same error.. "_GuiImageList_addIcon: -1" I am running Autoit 3.3.0.0 and Windows XP SP2.. I got this same error running your compiled version too.. Link to comment Share on other sites More sharing options...
Authenticity Posted April 9, 2009 Share Posted April 9, 2009 (edited) OK, here is the working function "Populate". Some icons may not be visible but works great. Thanks for the share NerdFencer. ;]expandcollapse popupFunc Populate($action = 0) Local $path = $uninstallpath Local $key, $name, $string, $icon, $iconindex, $temp For $i=1 To 999999 $key = RegEnumKey($path,$i) If @error Then ExitLoop $name = RegRead($path &$key,"DisplayName") If Not(@error) And ($filtertext=="" Or StringInStr($name,$filtertext)>0) Then $string = RegRead($path &$key,"UninstallString") If Not(@error) Then If $action == 1 Then $keys[$file] = $key $string = "" $temp = RegRead($path &$key,"Publisher") If Not(@error) And Not($temp=="") Then $string = $string & "Publisher: " & $temp & @CRLF $temp = RegRead($path &$key,"DisplayVersion") If Not(@error) And Not($temp=="") Then $string = $string & "Version: " & $temp & @CRLF $temp = RegRead($path &$key,"InstallDate") If Not(@error) And StringLen($temp)==8 Then $temp = ToMonth(StringLeft(StringRight($temp,4),2)) & StringRight($temp,2) & ", " & StringLeft($temp,4) $string = $string & "Install Date: " & $temp & @CRLF EndIf $information[$file] = $string RowAdd($name, $string) Else $icon = RegRead($path &$key,"DisplayIcon") If @error Then ContinueLoop $iconindex = 0 $temp = StringSplit($icon,",") If $temp[0]==2 Then $iconindex = Number($temp[2]) $icon = $temp[1] EndIf $icon = FileGetLongName($icon) If StringInStr($icon, '"') Then $icon = StringReplace($icon, '"', '') If StringRight($icon, 3) = 'ico' Then If FileExists($icon) Then _GUIImageList_AddIcon($Images, $icon) ContinueLoop EndIf If FileExists($icon) And IsNumber($iconindex) And $iconindex>=0 Then ConsoleWrite($icon & @LF) _GUIImageList_AddIcon($Images, $icon, $iconindex) Else $icon = RegRead($path &$key,"InstallLocation")&"\" $iconindex = 0 Local $first = FileFindFirstFile($icon&"*.exe") $icon = $icon & FileFindNextFile($first) If Not(@error) Then _GUIImageList_AddIcon($Images, $icon, $iconindex) Else _GUIImageList_AddIcon($Images, @SystemDir & "\Setup.exe", $iconindex) EndIf EndIf EndIf EndIf EndIf Next If $action == 0 Then _GUICtrlListView_SetImageList($list, $Images, 1) EndIf EndFuncEdit: Also, it's required to add Opt("ExpandEnvStrings", 1) in the header. Edited April 9, 2009 by Authenticity Link to comment Share on other sites More sharing options...
NerdFencer Posted April 9, 2009 Author Share Posted April 9, 2009 Ok, I re downloaded your corrected code and icon and I am admin and still get the same error.. "_GuiImageList_addIcon: -1" I am running Autoit 3.3.0.0 and Windows XP SP2.. I got this same error running your compiled version too.. Strange...Would you place MsgBox(0,$iconindex,$icon) right before _GUIImageList_AddIcon($Images, $icon, $iconindex) on line 185 and tell me the values of iconindex and $icon on the entry that it fails on? _________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell Link to comment Share on other sites More sharing options...
youknowwho4eva Posted April 9, 2009 Share Posted April 9, 2009 @qseller Quote out line 188 Giggity Link to comment Share on other sites More sharing options...
gseller Posted April 9, 2009 Share Posted April 9, 2009 It gives me 4-5 file names and paths and then the same error. I get the same error commenting out line 188 also.. Not in the cards to work for me I guess.. LOL Link to comment Share on other sites More sharing options...
Authenticity Posted April 9, 2009 Share Posted April 9, 2009 Did you add Opt('ExpandEnvStrings', 1) in the header? Link to comment Share on other sites More sharing options...
gseller Posted April 9, 2009 Share Posted April 9, 2009 Ok, added Opt('ExpandEnvStrings', 1) in the header.. Same... Link to comment Share on other sites More sharing options...
storme Posted May 10, 2009 Share Posted May 10, 2009 I'm getting the ""_GuiImageList_addIcon: -1" error as well. It's poping up from this bit of code (lines 198-206) $icon = RegRead($path &$key,"InstallLocation")&"\" $iconindex = 0 Local $first = FileFindFirstFile($icon&"*.exe") $icon = $icon & FileFindNextFile($first) If Not(@error) Then ;*_GUIImageList_AddIcon($Images, $icon, $iconindex) Else _GUIImageList_AddIcon($Images, @SystemDir & "\Setup.exe", $iconindex) EndIf You'll see the line I've conneted out to stop the error. I don't get any icons for those entries but that doesn't worty me that much. :-) Thanks for a great script. (even with this one little bug) John Morrison Some of my small contributions to AutoIt Browse for Folder Dialog - Automation SysTreeView32 | FileHippo Download and/or retrieve program information | Get installedpath from uninstall key in registry | RoboCopy function John Morrison aka Storm-E Link to comment Share on other sites More sharing options...
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