statik Posted May 21, 2010 Posted May 21, 2010 When I test my script, my runs to not work. I have the .reg file and the uninstallw.exe file in the same folder as the .exe script. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <winapi.au3> #Region ### START Koda GUI section ### Form=C:\Documents and Settings\admin\Desktop\SCRIPTING\Form1.kxf $Form1 = GUICreate("AFSOC - 1SOCS - Theater Deployable Communications", 500, 550, 192, 124, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE)) GUISetBkColor(0xFFFFFF) $Pic1 = GUICtrlCreatePic("1SOCS_Emblem.GIF", 56, 16, 385, 350, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Label1 = GUICtrlCreateLabel("Is this workstation for NIPR or SIPR?", 104, 384, 302, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button1 = GUICtrlCreateButton("NIPR", 140, 424, 80, 40, BitOR($BS_DEFPUSHBUTTON,$WS_GROUP,$WS_BORDER)) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Button2 = GUICtrlCreateButton("SIPR", 288, 424, 80, 40, BitOR($WS_GROUP,$WS_BORDER)) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $Button1 exit Case $nMsg = $Button2 run("regedit /s SIPR_Banner.reg") run("uninstallw.exe /qw{0768D7D7-0D13-4740-9684-A42CCF095BA4}") run("uninstallw.exe /qw{1BE8806A-84F8-4655-A381-0D5524430944}") Endselect Wend
taietel Posted May 21, 2010 Posted May 21, 2010 (edited) Try this: ShellExecuteWait("regedit.exe", "/s SIPR_Banner.reg",@ScriptDir) ShellExecuteWait("uninstallw.exe", "/qw {0768D7D7-0D13-4740-9684-A42CCF095BA4}", @ScriptDir) ShellExecuteWait("uninstallw.exe", "/qw {1BE8806A-84F8-4655-A381-0D5524430944}", @ScriptDir) Edited May 21, 2010 by taietel Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text
statik Posted May 24, 2010 Author Posted May 24, 2010 Sorry I take it back, it does work. This is what I am using, but is there anyway to not have the cmd window pop up? I also put the unistallw.exe file in the system32 folder to make it easier. ShellExecuteWait("regedit", "/s SIPR_Banner.reg",@ScriptDir) ShellExecuteWait("uninstallw", "/qw {0768D7D7-0D13-4740-9684-A42CCF095BA4}") ShellExecuteWait("uninstallw", "/qw {1BE8806A-84F8-4655-A381-0D5524430944}")
taietel Posted May 24, 2010 Posted May 24, 2010 According to the help file (it's in the AutoIt directory -> AutoIt3.chm), ShellExecuteWait ( "filename" [, "parameters" [, "workingdir" [, "verb" [, showflag]]]] ) For example, ShellExecuteWait("regedit", "/s SIPR_Banner.reg", @ScriptDir, "", @SW_HIDE) ... Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text
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