Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is an antivirus package that exists on most of our machines that needs to be removed. I did not deploy this software and it was not deployed via GPO - it was installed manually by the previous administrator on each machine. So, I do not think I can remove this software now using Group Policy because it was not installed via Group Policy. It does come with an MSI installer though.

I believe that I could still uninstall this software via a startup script though, possibly by first checking to see that certain indicators of the software's existence are present and then by removing the software using an unattended uninstaller batch file.

Is this a safe way to go? Does anyone have any tips or tricks on uninstalling software via startup scripts?

share|improve this question
If you know the ProductCode of the MSI, a simple: msiexec /x {XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} /qn should perform a silent uninstall, without any GUI. Replace xxx with the ProductCode. Of course, this requires that the MSI was packaged correctly to perform uninstallation. If the specific product/version is not installed, the above will return 1619, but should do so nearly instantaneously -- Building logic to check for various installation configs may not be worth the effort, as opposed to just brute-uninstall. – jscott Jun 19 '12 at 18:17
up vote 2 down vote accepted

Test it first, obviously, and if it takes "too long," consider another approach.

I've seen a lot of users completely destroy their images when startup or logon scripts are used to install or uninstall large software packages. They get impatient, reboot, and get their system into a state where it can't complete the install/uninstall, so it won't startup or let them log in, and then toss the problem they just created at IT.

At the very least, you should warn users that it's coming, and tell them to leave the computer alone while it's starting up. Might not do any good, depending on your users, but at least you're covering your ass if you do.

share|improve this answer

Yes, it technically would work.

This is usually combined with the installation of a/the new application. Typically, there would be custom action that would run the uninstall command, that would be incorporated into the transform for the replacement product.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.