Amptools -uninstall failing
I need to script an uninstall for the agent, but I'm getting the error below. I need to remove some old 5.3 agents from about 200 machines and so far Kace's provisioning and the GPO fail.
Any ideas?
Thanks!
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
rockhead44
10 years ago
Posted by:
murbot
10 years ago
Posted by:
AbhayR
10 years ago
You need to launch command prompt as administrator and then run that command.
Comments:
-
Thanks. Yea. Got that far, but need it all done programatically. Got about 200 machines to correct. - murbot 10 years ago
-
-
I've got another post that's covering that end with more detail. We can't use Kace's provisioning due to NTLM limitations.
See here - http://www.itninja.com/question/how-can-i-disable-the-uac-and-remove-and-reinstall-the-ampagent-without-rebooting
I've got the code below working to remove and reinstall the agent on a test machine, but it's not reliably disabling the UAC. We have about 200 remote computers with many running tests that can't be rebooted. I need to attempt to get the correct agent installed without rebooting, but if I can't disable the UAC or if it gets re-enabled after a reboot from a GPO that is set at a higher level that our OU, then I can't get the script to remove and reinstall the agent.
AutoIT code - Not sure if this will post in a code block or not.
[code]
; Check if Kace agent is installed and check the version. - Add this step maybe...
; If not installed or version is old, install the current version
Run(@ComSpec & " /c %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f")
Run(@ComSpec & " /c %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f")
Sleep (1000)
FileInstall("ampagent-5.5.30275-x86_HOSTSERVER.DOMAIN.gov.msi", @TempDir & "\ampagent-5.5.30275-x86_HOSTSERVER.DOMAIN.gov.msi", 1)
RunWait("MsiExec.exe /uninstall " & @TempDir & "\ampagent-5.5.30275-x86_HOSTSERVER.DOMAIN.gov.msi") ;qb not needed
Sleep(5000)
RunWait("MsiExec.exe /i " & @TempDir & "\ampagent-5.5.30275-x86_HOSTSERVER.DOMAIN.gov.msi /qn")
[code/] - murbot 10 years ago