Chimaera Posted July 25, 2014 Author Share Posted July 25, 2014 Yeah that works for me, im going to have a play and see what i can make it do, it didnt occur to me that i had to do them the other way round till later in the day and i was too busy at work to test it Ill get it doing some simple stuff and ive got some extra code for msi to add etc Many thanks to all for your help If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
careca Posted July 25, 2014 Share Posted July 25, 2014 You're welcome. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Chimaera Posted July 27, 2014 Author Share Posted July 27, 2014 (edited) Getting this working well now Small follow on question though Sometimes the registry key exists more than once is there a way to make it only use the first one it finds? sometimes it tries to do a second uninstall after its already uninstalled because the machine hasnt been restrated to remove the idea that the program is stilll there what would be the best way to achieve that? And for any that find it usefull here is a working version although i havent quite got the error stuff working right yet expandcollapse popup#include <Array.au3> ; For ArrayDisplay #include <MsgBoxConstants.au3> Global $sRegKey, $sRegPath, $sDisplayName, $Uninstall, $UninstallPath ;~ CCleaner|Defraggler|Spybot Search And Destroy 1.62|Malwarebytes Anti-Malware $sRegKey = 'CCleaner|Defraggler|{A92DAB39-4E2C-4304-9AB6-BC44E68B55E2}|Malwarebytes Anti-Malware_is1|' Global $aRegKeys = StringSplit($sRegKey, "|") ;~ _ArrayDisplay($aRegKeys) $sRegPath = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\|' & _ 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\|' & _ 'HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\|' & _ 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\|' & _ 'HKCU64\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' Global $aRegPath = StringSplit($sRegPath, "|") ;~ _ArrayDisplay( $aRegPath) For $regloop = 1 To $aRegPath[0] For $keyloop = 1 To $aRegKeys[0] Select ;~ ================================================= Case _IsRegistryExist($aRegPath[$regloop] & $aRegKeys[$keyloop], "QuietUninstallString") = 1 $sDisplayName = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "DisplayName") $UninstallPath = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") If StringInStr($UninstallPath, 'MsiExec.exe', 1) Then $Uninstall = RunWait($UninstallPath & ' /qb') If @error < 0 Then MsgBox($MB_OK, 'Uninstall Error', $sDisplayName & " Didn't Uninstall Correctly") ConsoleWrite($Uninstall & @CRLF) Else $Uninstall = ShellExecuteWait($UninstallPath, '/S') If @error < 0 Then MsgBox($MB_OK, 'Uninstall Error', $sDisplayName & " Didn't Uninstall Correctly") ConsoleWrite($Uninstall & @CRLF) EndIf ConsoleWrite($UninstallPath & @CRLF) ;~ ================================================= Case _IsRegistryExist($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") = 1 $UninstallPath = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") If StringInStr($UninstallPath, 'MsiExec.exe', 1) Then $Uninstall = RunWait($UninstallPath & ' /qb') If @error < 0 Then MsgBox($MB_OK, 'Uninstall Error', $sDisplayName & " Didn't Uninstall Correctly") ConsoleWrite($Uninstall & @CRLF) Else $Uninstall = ShellExecuteWait($UninstallPath, '/S') If @error < 0 Then MsgBox($MB_OK, 'Uninstall Error', $sDisplayName & " Didn't Uninstall Correctly") ConsoleWrite($Uninstall & @CRLF) EndIf ConsoleWrite($UninstallPath & @CRLF) ;~ ================================================= EndSelect Next Next MsgBox($MB_OK, 'Complete', " Programs Have Been Removed ") Func _IsRegistryExist($sKeyName, $sValueName) ; False = Doesn't Exist / 0 / True = Exists / 1 [Author guinness] RegRead($sKeyName, $sValueName) Return @error = 0 EndFunc ;==>_IsRegistryExist Edited July 27, 2014 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
careca Posted July 27, 2014 Share Posted July 27, 2014 Does it find more than "QuietUninstallString" and "UninstallString"? or does it find one of those in more than one place? The basic idea i would try would be: When i get to the uninstal execution, add the, let's call it "object", into a list, and whenever i get to the next uninstall command, seach for the string in that list to see if it's repeated, then, proceed, or not. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Chimaera Posted July 27, 2014 Author Share Posted July 27, 2014 It finds the keys more than once on different uninstall sections Its the same uninstall key just represented in more than one place on the registry I was debating about adding them to an array or ini, and sort it from there maybe then uninstall all the occurences at the end when the loops are finished, i guess that would also give me a check on whats being found as i can show the array or ini for checking if i get a prob Maybe.. If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Muzaiyan Posted July 27, 2014 Share Posted July 27, 2014 okay here are two solutions which may help you >TinyUninstaller v1.0.0.7 Update of 2012-09-03 try also this script which can be used as #include uninstall.au3 Link to comment Share on other sites More sharing options...
careca Posted July 28, 2014 Share Posted July 28, 2014 Think this is all about doing things by ourselves if we can. Where's the fun in just use whatever someone else has done? @chimaera: Good idea. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
guinness Posted July 28, 2014 Share Posted July 28, 2014 True, but then this thread has been going on for quite some time now. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Chimaera Posted July 28, 2014 Author Share Posted July 28, 2014 True, but then this thread has been going on for quite some time now. Probably because im not the best at coding If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
guinness Posted July 28, 2014 Share Posted July 28, 2014 (edited) I didn't mean it like that, sorry. Just careca a shouldn't look a gift horse in the mouth. Edited July 29, 2014 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
careca Posted July 28, 2014 Share Posted July 28, 2014 True, but then this thread has been going on for quite some time now. True, but then i didn't think there was a time limit per thread. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Chimaera Posted July 28, 2014 Author Share Posted July 28, 2014 (edited) No need to be sorry i didnt take it like that anyway Thx to anyone that assisted on this thread Edited July 28, 2014 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
careca Posted July 29, 2014 Share Posted July 29, 2014 So where do you stand now? Went on with those sugestions or tried the ini's route? Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Chimaera Posted July 29, 2014 Author Share Posted July 29, 2014 (edited) Well i got the non array add version working good but im having issues with ArrayAdd as it doesnt seem to work like the helpfile implies example below using just CCleaner as a reg key to search for For $regloop = 1 To $aRegPath[0] For $keyloop = 1 To $aRegKeys[0] ;~ ================================================= Local $aUninstallList = '' ; Tried this as well to give it an array head start >>> [2] = ["Org Item 1", "Org item 1"] ;~ ================================================= If _IsRegistryExist($aRegPath[$regloop] & $aRegKeys[$keyloop], "QuietUninstallString") Then $sUninstallPath = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "QuietUninstallString") ; Find UninstallString _ArrayAdd( $aUninstallList, $sUninstallPath) ConsoleWrite(@error & @CRLF) ConsoleWrite($sUninstallPath & ' Q' & @CRLF) ElseIf _IsRegistryExist($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") Then $sUninstallPath = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") ; Find UninstallString _ArrayAdd( $aUninstallList, $sUninstallPath) ConsoleWrite(@error & @CRLF) ConsoleWrite($sUninstallPath & ' U' & @CRLF) EndIf Next Next _ArrayDisplay( $aUninstallList) The return i get is 0 "C:Program FilesCCleaneruninst.exe" Which doesnt exist in the ArrayAdd returns, im confused Anyway after this gets working im gonna do an arrayUnique to remove the extras and send it to the uninstallers Edited July 29, 2014 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
guinness Posted July 30, 2014 Share Posted July 30, 2014 @error that is zero doesn't need to be documented as it implies there was no error. Maybe check the return value of the function instead. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Chimaera Posted July 30, 2014 Author Share Posted July 30, 2014 Wait wait i wasnt check the actual addarray... Local $aUninstallList [2] = ["Org Item 1", "Org item 1"] ;~ ================================================= If _IsRegistryExist($aRegPath[$regloop] & $aRegKeys[$keyloop], "QuietUninstallString") Then $sUninstallPath = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "QuietUninstallString") ; Find UninstallString Local $test =_ArrayAdd( $aUninstallList, $sUninstallPath) ConsoleWrite($test & '|' & @error & @CRLF) ConsoleWrite($sUninstallPath & ' Q' & @CRLF) ElseIf _IsRegistryExist($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") Then $sUninstallPath = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") ; Find UninstallString $test =_ArrayAdd( $aUninstallList, $sUninstallPath) ConsoleWrite($test & '|' & @error & @CRLF) ConsoleWrite($sUninstallPath & ' U' & @CRLF) EndIf which gives 2|0 "C:Program FilesCCleaneruninst.exe" Or Local $aUninstallList = '' ;[2] = ["Org Item 1", "Org item 1"] ;~ ================================================= If _IsRegistryExist($aRegPath[$regloop] & $aRegKeys[$keyloop], "QuietUninstallString") Then $sUninstallPath = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "QuietUninstallString") ; Find UninstallString Local $test =_ArrayAdd( $aUninstallList, $sUninstallPath) ConsoleWrite($test & '|' & @error & @CRLF) ConsoleWrite($sUninstallPath & ' Q' & @CRLF) ElseIf _IsRegistryExist($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") Then $sUninstallPath = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") ; Find UninstallString $test =_ArrayAdd( $aUninstallList, $sUninstallPath) ConsoleWrite($test & '|' & @error & @CRLF) ConsoleWrite($sUninstallPath & ' U' & @CRLF) EndIf -1|1 "C:Program FilesCCleaneruninst.exe" Does an array have to be created with data?, but then the top example has data but is not a 1 or 2d array If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
guinness Posted July 30, 2014 Share Posted July 30, 2014 You have to provide an array, so Local $aArray[0] is the minimum you can provide. Plus if you read the help file you will notice @error 1 is the variable is not an array, so that should answer your question. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Chimaera Posted July 30, 2014 Author Share Posted July 30, 2014 I didnt even know you could open an array like that Local $aArray[0] Local $aUninstallList[0] ; Inialize array with no elements ;~ _ArrayDisplay( $aUninstallList) ;~ ================================================= If _IsRegistryExist($aRegPath[$regloop] & $aRegKeys[$keyloop], "QuietUninstallString") Then $sUninstallPath = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "QuietUninstallString") ; Find UninstallString ConsoleWrite($sUninstallPath & ' Q' & @CRLF) Local $test =_ArrayAdd( $aUninstallList, $sUninstallPath) ConsoleWrite('$test = ' & $test & ' | error = ' & @error & @CRLF) ElseIf _IsRegistryExist($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") Then $sUninstallPath = RegRead($aRegPath[$regloop] & $aRegKeys[$keyloop], "UninstallString") ; Find UninstallString ConsoleWrite($sUninstallPath & ' U' & @CRLF) $test =_ArrayAdd( $aUninstallList, $sUninstallPath) ConsoleWrite('$test = ' & $test & ' | error = ' & @error & @CRLF) EndIf Next Next _ArrayDisplay( $aUninstallList) Now im getting this "C:Program FilesCCleaneruninst.exe" U $test = 0 | error = 0 So no errors it seems but it still doesnt add the "C:Program FilesCCleaneruninst.exe" into the array.. Ill keep looking If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
guinness Posted July 30, 2014 Share Posted July 30, 2014 (edited) Well it works for me... #include <Array.au3> Local $aUninstallList[0], _ $sUninstallPath = '"C:\Program Files\CCleaner\uninst.exe" U' _ArrayAdd($aUninstallList, $sUninstallPath) _ArrayDisplay($aUninstallList)I hate to be critical, but in future could you post something that I could use as I notice you tend to strip sections from your code expecting people to understand what is going on. BUT here is a solution, move that array declaration outside of the loop. I have said it many times on the forum, don't declare variables inside loops, as it slows down performance and leads to issues such as this. Edited July 30, 2014 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
guinness Posted July 30, 2014 Share Posted July 30, 2014 #include <Array.au3> ; You find it in the loop. Local $aUninstallList[0], _ $sUninstallPath = '"C:\Program Files\CCleaner\uninst.exe" U' _ArrayAdd($aUninstallList, $sUninstallPath) Local $aUninstallList[0] ; But then you re-declare again. Which will clear the previous contents added. _ArrayDisplay($aUninstallList) UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 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