rbenner1184 Posted February 24, 2015 Posted February 24, 2015 Hello, I am ready to rip my hair out at this point I am not knew to autoit or scripting at all and that is why I am failing to understand what I am doing wrong here. When i run the command in the command prompt the command executes successfully as it should, but when i attempt to run this code in autoit nothing seems to happen. I am really failing to realize why, becuase I use Runwait to run command line parameters all the time. Can some one please help me out here and show me why this will not work for me. The script is uninstalling java and obviously i need to have this for many different versions of java, but lets just get this one working first. Any ideas? thanks. #RequireAdmin $WinDir = "C:\Windows\System32" RunWait($WinDir & "\taskkill /f /im java.exe /T") RunWait($WinDir & "\taskkill /f /im javaw.exe /T") RunWait($WinDir & "\taskkill /f /im javaws.exe /T") RunWait($WinDir & "\taskkill /f /im jqs.exe /T") RunWait($WinDir & "\taskkill /f /im jusched.exe /T") RunWait($WinDir & "\taskkill /f /im iexplore.exe /T") RunWait($WinDir & "\taskkill /f /im firefox.exe /T") ;REM Uninstall v1.4.2_19 RunWait($WinDir & "\MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142190} /qb /norestart")
JohnOne Posted February 24, 2015 Posted February 24, 2015 Try like $Path = '"' & @SystemDir & "\taskkill /f /im java.exe /T" & '"' RunWait( $Path ) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
rbenner1184 Posted February 24, 2015 Author Posted February 24, 2015 It doesn't seem to be lines 17 through 23. It seems the issue is with line 27 call msiexec. RunWait($WinDir & "MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142190} /qb /norestart")
JohnOne Posted February 24, 2015 Posted February 24, 2015 And when you apply the above method? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Trong Posted February 25, 2015 Posted February 25, 2015 It work with me: ; ↓ /x {7148F0A8-6813-11D6-A77B-00B0D0142190} MsiExec.exe /X{ID} /qb /norestart ; ↓ {ID} ;~ HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall|{26A24AE4-039D-4CA4-87B4-2F83218025F0}|Java 8 Update 25|20150116 ;~ HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall|{26A24AE4-039D-4CA4-87B4-2F86418025F0}|Java 8 Update 25 (64-bit)|20150118 Enjoy my work? Buy me a 🍻 or tip via ❤️ PayPal
rbenner1184 Posted February 25, 2015 Author Posted February 25, 2015 I tried running the following and no dice still. RunWait('"' & @SystemDir & "\MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142190} /qb /norestart"& '"')
Solution Trong Posted February 25, 2015 Solution Posted February 25, 2015 I tried running the following and no dice still. RunWait('"' & @SystemDir & "\MsiExec.exe /x {7148F0A8-6813-11D6-A77B-00B0D0142190} /qb /norestart"& '"') Syntax error -> false path! Local $IT='"' & @SystemDir & '\MsiExec.exe" /X{26A24AE4-039D-4CA4-87B4-2F83218025F0} /qb /norestart' ConsoleWrite($IT&@CRLF) RunWait($IT) Enjoy my work? Buy me a 🍻 or tip via ❤️ PayPal
rbenner1184 Posted February 25, 2015 Author Posted February 25, 2015 (edited) Ok i figured it out it seems that autoit did not like me using #RequireAdmin also when i copied and pasted the code into a new au3 it worked. Go figure. Thanks for all your help. Sorry actually I meant to say Trong you were right besides that the syntax was incorrect. Thanks! Edited February 25, 2015 by rbenner1184
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