Can DAgent be uninstalled as a job?

This issue has been solved. See solution.
clint0r's picture

For the Aclient, you could choose a server, right click /advanced/ uninstall agent and it would deploy a job to uninstall the agent.  I then copied this job to my build script since my client wants it removed after a server is built.

For 2008, if I right click/uninstall the agent will not remove itself.  Does anyone know if this is possible?  I'm trying to avoid running an msiexec as a runonce.

Cheers
cp

George Wagner's picture

I push a job that has the

Solution

I push a job that has the following script:

MsiExec.exe /X{6C8D5E56-CA12-42B2-9075-044B4C7067A9} /qn

You would just want to make sure that the MSI guid is the same for your DAgent version. You look for it in the registry under HKLM\Software\Microsft\Windows\CurrentVersion\Uninstall.

-Geo

Don't forget to mark the solution to your forum post if it has been answered!

clint0r's picture

Thanks - the job works well

Thanks - the job works well but unfortunately does not finish.  This will work but I was hoping to have a job that completes successfully to give our server builders the green check mark.  I wonder if there's a timeout that be set on the script from the altiris side and to give it a success code after it errors out?

Cheers
cp

George Wagner's picture

Oh, I forgot! If you're

Oh, I forgot! If you're pushing it as a DS job to the client, it doesn't finish because it DAgent loses connectivity with the DS and can't report back the status. I also have it setup as a batch file that the techs can run manually from a computer that needs the DAgent removed.

-Geo

Don't forget to mark the solution to your forum post if it has been answered!

clint0r's picture

I will open a call with

I will open a call with Altiris to see if there's a proper way to do it, if so I'll post an update here.  If not, I'll just keep the job as is.

Thanks

kwshag's picture

Error 1605

Ran the job below and I keep getting  "Error 1605 script during execution" any other ideas

REM Uninstall DAgent through MsiExec

MsiExec.exe /uninstall {6C8D5E56-CA12-42B2-9075-044B4C7067A9} /qn /norestart

:: DAgent GUID Location:
:: Regedit:  HKLM\Software\Microsoft\Windows\Currentversion\Uninstall

George Wagner's picture

Error 1605 means that you are

Error 1605 means that you are trying to uninstall a product that is not installed on the system.

http://www.appdeploy.com/msierrors/detail.asp?id=119

So, either the DAgent is not really there, or it's a different version and therefore has a different GUID.

-Geo

Don't forget to mark the solution to your forum post if it has been answered!