# Solved: Uninstall antivirus using a batch file??



## kcgmit83 (Feb 6, 2008)

I am trying to create a batch file which will run quietly in the background as a user logs on to their computer on our company network so that it uninstalls the current antivirus program and then installs our new antivirus software. This hopefully will provide as little disruption as possible to each user. 
I have an idea about how to install the new program using a batch file but I have not seen many threads on how you would remove antivirus programs using one.
The reason I am going about it this way is because we have 50+ machines that are required to be upgraded to our new software asap. All our machines are Windows XP OS. My knowledge of scripting is very limited so I thought this would be an interesting project to take on. Any help would be really appreciated.


----------



## -Fabez- (Jul 28, 2008)

Using a higher level programming language would make this task a lot easier


----------



## kcgmit83 (Feb 6, 2008)

What program language were you thinking of Fabez? I am open to any suggestions! The one reason I was hoping to use batch files was that I had come across them before for a different project and they seemed pretty useful.


----------



## -Fabez- (Jul 28, 2008)

I was thinking Python as it is a high level language that is easy to use. There is a command in Python that enables you to use commands you would use in batch files, so that would help as well.


----------



## kcgmit83 (Feb 6, 2008)

Cheers for that Fabez. Will have a look at Python so as I haven't got very far using ordinary batch files!!


----------



## -Fabez- (Jul 28, 2008)

No problems, if you need any help I will be happy to help you


----------



## kcgmit83 (Feb 6, 2008)

More than likely I will!! Thanks again Fabez and I'll let you know how its going.


----------



## cwwozniak (Nov 29, 2005)

It has been many years since I have written any program to run under Windows but ...

I would think that any decent anti-virus program would be set up to make it very difficult if not impossible to silently uninstall it with any kind of start-up script or program. If it was that simple, the virus creators would have an easy time of deleting the anti-virus software as well. I would not be surprised if any software you created would be treated as a virus and deleted or quarantined by the current AV software.


----------



## Codiah (Sep 27, 2008)

I'm with CWW on this one, almost all anti-virus now days are set up to block any control from an outside application, the only thing i could think of that would negate this, would be an anti-virus upgrade, then it would be as simple as using batch script to kill the AV processes (that's if those are not guarded as well, i know for a fact that software such as AVG Anti-Virus have some guards against using task kill on them) and do a silent install, but if your switching to another AV where the previous one has to be removed i do believe your going to have a mighty tough time figuring out a way around that, most likely any solution that you think of would be as CWW said, targeted as a virus itself and quarantined.


----------



## kcgmit83 (Feb 6, 2008)

Yeah it hasn't been easy so far anyway! It does look like the AV software is protected from any delete commands as I did try a couple of simple ones out. I'll keep looking and I am currently trying out some different commands with python so we'll see how that goes. Thanks for your input CWW and Codiah


----------



## DoubleHelix (Dec 10, 2004)

It sounds like you need a centrally managed anti-virus solution. The vendor would then provide a way to install, uninstall, and upgrade the clients.


----------



## kcgmit83 (Feb 6, 2008)

That would probably be required alright DH but I was just trying top see if there was a workaround which would have easier on each individual user and also cost effective. At this stage I have tried quite a few things and it is looking like it is near impossible to remove AV sofware fully using batch commands or programming language.


----------



## DoubleHelix (Dec 10, 2004)

"Cost effective" does not equal spending as little as possible on software. There are costs involved in maintenance, risk, support, etc.


----------



## kcgmit83 (Feb 6, 2008)

Well i am not in charge of budgets HD and thought it would be an interesting project to take on which it has been but very tough at the same time! I think I will recommend for us here to use the centrally managed AV system as it seems way easier to manage software and silent installs or upgrades


----------



## kcgmit83 (Feb 6, 2008)

Thanks for all your info guys but have successfully run a batch file using PS Tools which is available online for free. I can run it then using the psexec execute file to uninstall the av software incorporating its uninstall string found in regedit into the command line. It took a while but we got there in the end!! Thanks again!


----------

