insomnai Posted October 11, 2011 Share Posted October 11, 2011 Hi guys, gals and cybernetic organisms! I have an issue with my script and I could use an assist with it's validation. If someone would be so kind as to see where I have gone wrong that would be great. expandcollapse popup#RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Version=beta #AutoIt3Wrapper_icon=..\..\kh.ico #AutoIt3Wrapper_outfile=..\..\TMDtoolkit.exe #AutoIt3Wrapper_Compression=4 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x/NT ; Author: insomnai #include <GUIConstantsEx.au3> #include <Process.au3> Toolkit() Func Toolkit() Dim $OS = @OSVersion Dim $OSArch = @OSArch Dim $OSServicePack = @OSServicePack Switch $OS Case "WIN_7" $OS = "Windows 7" Case "WIN_2008" $OS = "Windows Server 2008" Case "WIN_VISTA" $OS = "Windows Vista" Case "WIN_2003" $OS = "Windows Server 2003" Case "WIN_XP" $OS = "Windows XP" Case "WIN_2000" $OS = "Windows 2000" Case "WIN_NT4" $OS = "Windows NT 4.0" Case "WIN_ME" $OS = "Windows ME" Case "WIN_98" $OS = "Windows 98" Case "WIN_95" $OS = "Windows 95" Case Else $OS = "Unknown!" EndSwitch Switch $OSArch Case "X64" $OSArch = "64bit" Case Else $OSArch = "32bit" EndSwitch Switch $OSServicePack Case "Service Pack 1" $OSServicePack = "SP1" Case "Service Pack 2" $OSServicePack = "SP2" Case "Service Pack 3" $OSServicePack = "SP3" Case "Service Pack 4" $OSServicePack = "SP4" Case Else $OSServicePack = "Pre-SP" EndSwitch GUICreate("TMDtoolkit - Running from '" & @ScriptDir & "' on the '" & @UserName & "' account", 750, 221) $tablab_os = GUICtrlCreateLabel($OS & " - " & $OSServicePack & " - " & $OSArch, 300, 190, 300, 15) $guiWiFi = GUICtrlCreateButton("Store Wi-Fi", 5, 191, 75, 25) $guiScreensaver = GUICtrlCreateButton("Screensaver", 85, 191, 75, 25) ; $guiShutdown = GUICtrlCreateButton("Shutdown", 670, 191, 75, 25) $tab = GUICtrlCreateTab(5, 5, 740, 181) $tab0 = GUICtrlCreateTabItem("AntiVirus Removal") $t0bt_norton = GUICtrlCreateButton("Norton Removal Tool", 10, 31, 150, 25) $t0bt_mcafee = GUICtrlCreateButton("McAfee Removal Tool", 10, 61, 150, 25) $t0bt_avg = GUICtrlCreateButton("AVG Removal Tool", 10, 91, 150, 25) $tab1 = GUICtrlCreateTabItem("AntiVirus Install") $t1bt_nort360 = GUICtrlCreateButton("Norton 360v5", 10, 31, 150, 25) $t1bt_n360net = GUICtrlCreateButton("Norton 360v4 - Netbook", 10, 61, 150, 25) $t1bt_nortis = GUICtrlCreateButton("Norton Internet Security", 10, 91, 150, 25) $t1bt_kis = GUICtrlCreateButton("Kaspersky Internet Security", 10, 121, 150, 25) $t1bt_kisnet = GUICtrlCreateButton("Kaspersky I. S. - Netbook", 10, 151, 150, 25) $t1bt_kispure = GUICtrlCreateButton("Kaspersky Pure", 165, 31, 150, 25) $t1bt_tmtit = GUICtrlCreateButton("Trend Micro Titanium", 165, 61, 150, 25) $t1bt_tmtitmxsec = GUICtrlCreateButton("TMT - Maximum Security", 165, 91, 150, 25) $t1bt_esetss = GUICtrlCreateButton("ESET Smart Security", 165, 121, 150, 25) $t1bt_esetos = GUICtrlCreateButton("ESET Online Scanner", 165, 151, 150, 25) $t1bt_esetnod32 = GUICtrlCreateButton("ESET NOD32 AV 5", 320, 31, 150, 25) $t1bt_avira = GUICtrlCreateButton("Avira AntiVir Personal", 320, 61, 150, 25) $t1bt_webroot = GUICtrlCreateButton("Webroot", 320, 92, 150, 25) $t1bt_avgavirus = GUICtrlCreateButton("AVG AntiVirus", 320, 121, 150, 25) $tab2 = GUICtrlCreateTabItem("Office") $t2bt_moffice = GUICtrlCreateButton("Microsoft Office 2010", 10, 31, 150, 25) $t2bt_ooffice = GUICtrlCreateButton("Open Office", 10, 61, 150, 25) $t2bt_mworks = GUICtrlCreateButton("Microsoft Works", 10, 91, 150, 25) $tab3 = GUICtrlCreateTabItem("Chat") $t3bt_winlive = GUICtrlCreateButton("Windows Live Essentials", 10, 31, 150, 25) $t3bt_skype = GUICtrlCreateButton("Skype", 10, 61, 150, 25) $t3bt_trillian = GUICtrlCreateButton("Trillian", 10, 91, 150, 25) $t3bt_mirc = GUICtrlCreateButton("mIRC", 10, 121, 150, 25) $tab4 = GUICtrlCreateTabItem("Browsers") $t4bt_intexp = GUICtrlCreateButton("Internet Explorer 8", 10, 31, 150, 25) $t4bt_intexp9 = GUICtrlCreateButton("Internet Explorer 9", 10, 61, 150, 25) $t4bt_chrome = GUICtrlCreateButton("Google Chrome", 10, 91, 150, 25) $t4bt_firefox = GUICtrlCreateButton("Mozilla Firefox", 10, 121, 150, 25) $t4bt_safari = GUICtrlCreateButton("Safari", 10, 151, 150, 25) $tab5 = GUICtrlCreateTabItem("Mobile BB") $t5bt_three = GUICtrlCreateButton("3 (Three) MF112", 10, 31, 150, 25) $t5bt_voda = GUICtrlCreateButton("Vodafone", 10, 61, 150, 25) $tab6 = GUICtrlCreateTabItem("Music and Video") $t6bt_itunes = GUICtrlCreateButton("iTunes", 10, 31, 150, 25) $t6bt_vlc = GUICtrlCreateButton("VLC Media Player", 10, 61, 150, 25) $t6bt_cdex = GUICtrlCreateButton("CDEX", 10, 91, 150, 25) $tab7 = GUICtrlCreateTabItem("Malware/Spyware") $t7bt_mbam_i = GUICtrlCreateButton("Malwarebytes'", 10, 31, 150, 25) $t7bt_sas_i = GUICtrlCreateButton("SUPERAntiSpyware", 10, 61, 150, 25) $t7bt_combo = GUICtrlCreateButton("ComboFix", 10, 91, 150, 25) $t7bt_atf = GUICtrlCreateButton("ATF Cleaner", 10, 121, 150, 25) $t7bt_cclean = GUICtrlCreateButton("CCleaner", 10, 151, 150, 25) $t7bt_mbam_u = GUICtrlCreateButton("Malwarebytes' Updater", 165, 31, 150, 25) $t7bt_sas_u = GUICtrlCreateButton("SUPERAntiSpyware Updater", 165, 61, 150, 25) $t7bt_update = GUICtrlCreateButton("Tools Updater", 165, 91, 150, 25) $tab8 = GUICtrlCreateTabItem("Diags and Repair") $t8bt_msconfig = GUICtrlCreateButton("MSCONFIG - Startup Entries", 10, 31, 150, 25) $t8bt_internet = GUICtrlCreateButton("Internet Options", 10, 61, 150, 25) $t8bt_unknown = GUICtrlCreateButton("Unknown Devices", 10, 91, 150, 25) $t8bt_cpuz = GUICtrlCreateButton("CPUZ", 10, 121, 150, 25) $t8bt_process = GUICtrlCreateButton("Process Explorer", 10, 151, 150, 25) $t8bt_adobe = GUICtrlCreateButton("Adobe Reader Crash Fix", 165, 31, 150, 25) $t8bt_cddvd = GUICtrlCreateButton("Missing CD/DVD Fix", 165, 61, 150, 25) $t8bt_netrepair = GUICtrlCreateButton("Basic Internet Repair", 165, 91, 150, 25) $t8bt_chkdsk = GUICtrlCreateButton("Stop CHKDSK Loop", 165, 121, 150, 25) $t8bt_deltemp = GUICtrlCreateButton("Delete Temp Files", 165, 151, 150, 25) $t8bt_autoruns = GUICtrlCreateButton("Autoruns", 320, 31, 150, 25) $t8bt_appwiz = GUICtrlCreateButton("Programs and Features", 320, 61, 150, 25) $t8bt_trans = GUICtrlCreateButton("File Security", 320, 91, 150, 25) $t8bt_debugger = GUICtrlCreateButton("Debug", 320, 121, 150, 25) $tab9 = GUICtrlCreateTabItem("Misc") $t9bt_kodak = GUICtrlCreateButton("Kodak AIO Printer", 10, 31, 150, 25) $t9bt_apple = GUICtrlCreateButton("Apple iOS Updates", 10, 61, 150, 25) $t9bt_flash = GUICtrlCreateButton("Adobe Flash", 10, 91, 150, 25) $t9bt_reader = GUICtrlCreateButton("Adobe Reader", 10, 121, 150, 25) $t9bt_air = GUICtrlCreateButton("Adobe Air", 10, 151, 150, 25) $t9bt_java = GUICtrlCreateButton("Java", 165, 31, 150, 25) $t9bt_iplayer = GUICtrlCreateButton("BBC iPlayer", 165, 61, 150, 25) $t9bt_khapp = GUICtrlCreateButton("KH App Installer", 165, 91, 150, 25) GUISetState(@SW_SHOW) ;end of gui design and placement While 1 ;path shortcuts $msg = GUIGetMsg() $avr = @ScriptDir & "\Tools\antivirusremoval\" $avi = @ScriptDir & "\Tools\antivirus\" $off = @ScriptDir & "\Tools\office tools\" $cht = @ScriptDir & "\Tools\communication\" $brw = @ScriptDir & "\Tools\browsers\" $mbb3 = @ScriptDir & "\Tools\mobile broadband\three - mf112\setup\" $mbbvod = @ScriptDir & "\Tools\Mobile Broadband\Vodafone\10-1\" $mal = @ScriptDir & "\Tools\malware\" $dgr = @ScriptDir & "\Tools\hwinfo\" $misc = @ScriptDir & "\Tools\Extras\" Select ;Miscellaneous Items Case $msg = $t9bt_kodak Run(@ScriptDir & "\Tools\Printer Software\" & "kodak-aio-win.exe") Case $msg = $t9bt_reader Run($misc & "adobereader10.exe") Case $msg = $t9bt_air Run($misc & "adobeairinstaller.exe") Case $msg = $t9bt_java Run($misc & "jre-6u24-windows-i586-s.exe") Case $msg = $t9bt_iplayer ; Run($misc & "adobeairinstaller.exe") Run($misc & "bbc_iplayer_desktop_v327.air") Case $msg = $t9bt_khapp Run($misc & "kh-app-center.exe") Case $msg = $t9bt_flash Run($misc & "install_flash_player.exe") ;AntiVirus Removal Case $msg = $t0bt_norton Run($avr & "norton-rmv.exe") Case $msg = $t0bt_mcafee Run($avr & "mcafee-rmv.exe") Case $msg = $t0bt_avg Switch @OSArch ; OS Is x32/x64 Case "X64" _RunDOS($avr & "avgremoverx64.exe") Case Else _RunDOS($avr & "avgremoverx86.exe") EndSwitch ;AntiVirus Installers Case $msg = $t1bt_nort360 Run($avi & "n360.exe") Case $msg = $t1bt_n360net Run($avi & "n360v4-netbook.exe") Case $msg = $t1bt_nortis Run($avi & "nis2011.exe") Case $msg = $t1bt_kis Run($avi & "KIS-2011.exe") Case $msg = $t1bt_kisnet Run($avi & "KIS-Netbook.msi") Case $msg = $t1bt_tmtit Switch @OSArch ; OS Is x32/x64 Case "X64" Run($avi & "tm-titaniumx64.exe") Case Else Run($avi & "tm-titaniumx86.exe") EndSwitch Case $msg = $t1bt_webroot Run($avi & "webroot.exe") Case $msg = $t1bt_esetss Switch @OSArch ; OS Is x32/x64 Case "X64" Run($avi & "esetsmsec64.exe") Case Else Run($avi & "esetsmsec32.exe") EndSwitch Case $msg = $t1bt_esetnod32 ShellExecute($avi & "esetanthome64.msi") Case $msg = $t1bt_avira Run($avi & "Avira-Personal.exe") ; Case $msg - $t1bt_avgavirus Switch @OSArch Case "X64" Run($avi & "avg_setup_64.exe") MsgBox(0,"AVG AntiVirus","This is the 64bit Version!") Case Else Run($avi & "avg_setup_32.exe") MsgBox(0,"AVG AntiVirus","This is the 32bit Version!") EndSwitch ;Office Installers Case $msg = $t2bt_moffice If FileExists(@ProgramFilesDir & "\microsoft office\options14\msoo.exe") Then Run(@ProgramFilesDir & "\microsoft office\options14\msoo.exe") Else Run($off & "office2010.exe") EndIf Case $msg = $t2bt_mworks ; Run($off & "msworks.exe") MsgBox(0,"MS Works", "This will install MS Works!") Case $msg = $t2bt_ooffice Run($off & "openoffice.exe") ;Chat Software Installers Case $msg = $t3bt_winlive _RunDOS($cht & "wlive.exe") Case $msg = $t3bt_skype Run($cht & "skypesetup.exe") Case $msg = $t3bt_trillian Run($cht & "trillian.exe") Case $msg = $t3bt_mirc Run($cht & "mirc.exe") ;Browsers Case $msg = $t4bt_intexp Run($brw & "ie8setup.exe") Case $msg = $t4bt_chrome Run($brw & "chromesetup.exe") Case $msg = $t4bt_firefox Run($brw & "firefoxsetup.exe") Case $msg = $t4bt_safari Run($brw & "safarisetup.exe") ;Mobile Broadband Case $msg = $t5bt_three Run($mbb3 & "setup.exe") Case $msg = $t5bt_voda Run($mbbvod & "setup_vmb.exe") ;malware Spyware Case $msg = $t7bt_mbam_i Run($mal & "mbam-setup.exe") Case $msg = $t7bt_sas_i Run($mal & "superantispyware.exe") Case $msg = $t7bt_combo Run($mal & "combofix.exe") Case $msg = $t7bt_atf Run($mal & "atf-cleaner.exe") Case $msg = $t7bt_cclean Run($mal & "ccsetup.exe") Case $msg = $t7bt_mbam_u Run($mal & "mbam-rules.exe") Case $msg = $t7bt_sas_u Run($mal & "sasdefinitions.exe") Case $msg = $t7bt_update Dim $updaterAns $updaterAns = MsgBox(36,"Updater","This will update all Malware/Spyware tools in the TMDtoolkit." & @CRLF & "Do you want to continue?") Select Case $updaterAns = 6 ;Yes $key="HKCU\Software\Microsoft\Internet Explorer" $value1="Download Directory" $value2=@ScriptDir & "\Tools\Malware\" $value3="%userprofile%\Downloads\" RegWrite($key, $value1, "REG_SZ", $value2) Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE -new http://www.malwarebytes.org/mbam-download.php","") Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE -new http://data.mbamupdates.com/tools/mbam-rules.exe","") FileDelete(@ScriptDir & "\tools\malware\combofix.exe") Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE -new http://www.bleepingcomputer.com/download/anti-virus/combofix/","") Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE -new http://downloads.superantispyware.com/downloads/SUPERAntiSpyware.exe","") Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE -new http://www.superantispyware.com/downloads/SASDEFINITIONS.EXE","") Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE -new http://www.superantispyware.com/sasportable.php","") RegWrite($key, $value1, "REG_SZ", $value3) Case $updaterAns = 7 ;No MsgBox(0, "Tools Updater", "Update has been cancelled.") EndSelect ;Diagnostics and repairs Case $msg = $t8bt_msconfig _RunDOS("msconfig.exe") Case $msg = $t8bt_internet _RunDOS("inetcpl.cpl") Case $msg = $t8bt_unknown Run(@ScriptDir & "tools\driverrec\unknwndvs\unknowndevices.exe") Case $msg = $t8bt_cpuz Switch @OSArch ; OS Is x32/x64 Case "X64" _RunDOS($dgr & "cpuz64\cpuz64.exe") Case Else _RunDOS($dgr & "cpuz32\cpuz.exe") EndSwitch Case $msg = $t8bt_process Run($dgr & "prcxplr\procexp.exe") Case $msg = $t8bt_adobe ; Run("someprogram.exe /switch") Case $msg = $t8bt_cddvd $mainkey = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}" $key1 = RegRead($mainkey,"UpperFilters") $key2 = RegRead($mainkey,"LowerFilters") _RunDOS('REG EXPORT ' & $mainkey & ' "' & @DesktopDir & '\filters.reg"') RegDelete($mainkey, "UpperFilters") RegDelete($mainkey, "LowerFilters") Case $msg = $t8bt_netrepair ; :oth-intrep ; ECHO Resetting Hosts file ; xcopy "%tools%\malware\hosts" "%systemroot%\system32\drivers\etc\" /R /Y /K /H >NUL ; ECHO Backing up current network and proxy settings. ; REG EXPORT "hkcu\Software\Microsoft\Windows\CurrentVersion\Internet Settings" "%userprofile%\desktop\Proxy.reg" >NUL ; ECHO Removing current proxy settings if they exist. ; REG ADD "hkcu\software\microsoft\windows\currentversion\internet settings" /V "ProxyEnable" /T "REG_DWORD" /D "0" /F >NUL ; REG ADD "hkcu\software\microsoft\windows\currentversion\internet settings" /V "ProxyOverride" /T "REG_SZ" /D "*.local" /F >NUL ; REG DELETE "hkcu\software\microsoft\windows\currentversion\internet settings" /V "ProxyServer" /F 2>NUL ; NETSH WINSOCK RESET >NUL ; NETSH INT IP RESET >NUL ; IPCONFIG /FLUSHDNS >NUL ; ECHO Disabling static IP on Wireless Network Connection if present. ; NETSH INTERFACE IP SET ADDRESS NAME="Wireless Network Connection" SOURCE=DHCP >NUL ; NETSH INTERFACE IP SET DNS NAME="Wireless Network Connection" SOURCE=DHCP >NUL ; NETSH INTERFACE IP SET WINS NAME="Wireless Network Connection" SOURCE=DHCP >NUL ; ECHO Disabling static IP on Local Area Network Connection if present. ; NETSH INTERFACE IP SET ADDRESS NAME="Local Area Connection" SOURCE=DHCP >NUL ; NETSH INTERFACE IP SET DNS NAME="Local Area Connection" SOURCE=DHCP >NUL ; NETSH INTERFACE IP SET WINS NAME="Local Area Connection" SOURCE=DHCP >NUL ; ECHO Resetting dependencies and group services. ; NET LOCALGROUP ADMINISTRATORS /ADD LOCALSERVICE ; NET LOCALGROUP ADMINISTRATORS /ADD NETWORKSERVICE ; PAUSE ; GOTO sys-rest Case $msg = $t8bt_chkdsk $chkVal = InputBox("CHKDSK Loop Stopper", "Enter a drive letter", "", "", 250, 150) ;_RunDOS("FSUTIL DIRTY QUERY " & $chkVal & ":") _RunDOS("CHKNTFS /X " & $chkVal & ":") MsgBox(0, "CHKDSK Loop Stopper", "CHKDSK Loop now ended on the " & $chkVal & ":\ Drive") Case $msg = $t8bt_deltemp ; Run("someprogram.exe /switch") Case $msg = $t8bt_autoruns Run($dgr & "autoruns\autoruns.exe") Case $msg = $t8bt_appwiz _RunDOS("appwiz.cpl") Case $msg = $t8bt_debugger MsgBox(0, "stuff", _ "@ScriptDir = " & @ScriptDir & @CRLF & _ "@SystemDir = " & @systemdir & @CRLF & _ "@DesktopDir = " & @DesktopDir & @CRLF & _ "@HomeDrive = " & @HomeDrive & @CRLF & _ "@HomePath = " & @HomePath & @CRLF & _ "@HomeShare = " & @HomeShare & @CRLF & _ "@TempDir = " & @TempDir & @CRLF & _ "@ComputerName = " & @ComputerName & @CRLF & _ "$OS / @OSVersion = " & $OS & @CRLF & _ "$OSArch = " & $OSArch & @CRLF & _ "@OSArch = " & @OSArch & @CRLF & _ "$OSServicePack / @OSServicePack = " & $OSServicePack & @CRLF & _ "$DesktopDir = " & @DesktopDir & @CRLF & _ "$ProgramFilesDir = " & @ProgramFilesDir & @CRLF & _ "@ProgramsCommonDir = " & @ProgramsCommonDir & @CRLF & _ "@ProgramsDir = " & @ProgramsDir & @CRLF & _ "@IPAddress1 = " & @IPAddress1 & @CRLF & _ "@IPAddress2 = " & @IPAddress2 & @CRLF & _ "@IPAddress3 = " & @IPAddress3 & @CRLF & _ "@IPAddress4 = " & @IPAddress4 & @CRLF & _ "" ) Case $msg = $guiWiFi $wifi = @ScriptDir & "\Tools\Wifi\TGT\" DirCopy($wifi,@ScriptDir,1) RunWait(@ScriptDir & "setupsnk.exe") WinWaitActive("Wireless Network Setup Wizard", 'Do you want to add this computer') send("{ENTER}") send("{ENTER}") ;Disable screensaver Case $msg = $guiScreensaver $key="HKEY_CURRENT_USER\Control Panel\Desktop" $value1="ScreenSaveActive" $value2="SCRNSAVE.EXE" If Number(RegRead($key, $value1)) Then RegWrite($key, $value1, "REG_SZ", 0) RegDelete($key, $value2) MsgBox(0, "ScreenSaver", "Screensaver Disabled") Else RegWrite($key, $value1, "REG_SZ", 1) MsgBox(0, "ScreenSaver", "Screensaver Re-Enabled") EndIf ;Shutdown system 30 second timer ; Case $msg = $guiShutdown ; MsgBox(0, "TMDtoolkit", "Shutting down. Please save any work before clicking the OK button.") ; _RunDOS('shutdown /S /T 30 /c "Shutting down in 30 seconds"') ; ExitLoop ;Close GUI Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd EndFunc ;Toolkit Now, here's the issue, some of these buttons don't work. In particular, the AVG installers. what happens if I strip off the semi-colons is an endless loop of either the installer or the messagebox that I was testing it with. I can't figure out why. Secondly, I know there is lots of stuff in here that is commented out but that is for my notes. I'm moving my batch script to autoit. Hopefully. Third again with buttons, running installers work on some machines but don't work on others. I can't fathom that either. Anyone know any reasons for this? Lastly, I would like the script to refer to a file or .ini, but I don't even know where to begin. I've read the help file but I could use some help in the good ole' lamens terms as I can't get my head around it. I don't want anyone to do this for me, I would rather be pointed in the right direction, perhaps with an example that I can apply to my script that would work, or at least the correct help section? Please consider this before just telling me to google it or read the help file again (if you don't mind ;-) ) Please let me know if there is anything I should change. Many thanks insomnai Link to comment Share on other sites More sharing options...
BrewManNH Posted October 11, 2011 Share Posted October 11, 2011 Here's your problem: Case $msg - $t1bt_avgavirus You have a minus sign in there instead of an equals. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
wraithdu Posted October 11, 2011 Share Posted October 11, 2011 (edited) ; Case $msg - $t1bt_avgavirus That looks like a typo to me. Edit: Damn, sniped! Edited October 11, 2011 by wraithdu Link to comment Share on other sites More sharing options...
insomnai Posted October 11, 2011 Author Share Posted October 11, 2011 BrewmanNH & Wraithdu thank you both. Now for the other questions... Any ideas? Link to comment Share on other sites More sharing options...
BrewManNH Posted October 11, 2011 Share Posted October 11, 2011 Hard to say for sure without knowing which buttons don't work, and what happens when you press them. Also, as to the ini file, what are you looking to put into it and where are you going to use the information in it in your script? Writing and reading from an INI file is fairly straightforward, IniWrite, IniRead, InWriteSection, IniReadSection are the functions you'd want to look at. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
insomnai Posted October 12, 2011 Author Share Posted October 12, 2011 Thanks for your kind response, it certainly has pointed me in the right direction. What i've done now is change a lot of the script in order to remove the majority of placed buttons in favour of a simple menu system. What I did find however is the reason that some of the buttons didn't work in the first place. It turns out that some of the executables were in fact .msi files and I have to run "shellexecute" or "shellexecutewait" for those... Again, thank you very much! insomnai Hard to say for sure without knowing which buttons don't work, and what happens when you press them. Also, as to the ini file, what are you looking to put into it and where are you going to use the information in it in your script? Writing and reading from an INI file is fairly straightforward, IniWrite, IniRead, InWriteSection, IniReadSection are the functions you'd want to look at. 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