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?

0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity


I've never seen that error. My batch file for uninstalls contains these lines:

net stop AMPAgent
cd "c:\Program Files (x86)\Dell\KACE"
amptools.exe uninstall

So, I browse to the KACE root then run the uninstaller. That may help.It's worth a try. 
Answered 09/11/2014 by: rockhead44
Red Belt

Please log in to comment
Thanks for the reply. It looks like I get the same error with that code as well. Weird. 

I'll research the issue further today. If there's any other suggestions, I'm in need. :-)

Answered 09/12/2014 by: murbot
Tenth Degree Black Belt

Please log in to comment
You need to launch command prompt as administrator and then run that command.
Answered 09/12/2014 by: AbhayR
Eighth Degree Black Belt

  • Thanks. Yea. Got that far, but need it all done programatically. Got about 200 machines to correct.
    • Are you unable to do that with provisioning on K1000?

      What is the issue?
      • 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.

        ; 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


        RunWait("MsiExec.exe /i " & @TempDir & "\ampagent-5.5.30275-x86_HOSTSERVER.DOMAIN.gov.msi /qn")
Please log in to comment