Jump to content

Recommended Posts

Posted

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")
Posted

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

Regards,
 

Posted (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 by rbenner1184

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...