How do I uninstall a program automatically using a .bat file?

The company I work for employs login scripts for every user when they log into their computers. The script does routine things like map network shares.

My company also uses a program called IP OFFICE from the Avaya company which allows you to kind of control your phone from the PC, and do other things like look people up in the phone directory by connecting to our IP.

However IP Office needs to now be un-installed from every computer, and instead of going from PC to PC to uninstall this program, I was hoping there would be a more efficient way of doing it. Then the login script occurred to me. Would there be a way to uninstall this program using the bat file? Because then we would just have to add a simple line like "/uninst programfiles/avaya" to the bat file and it would slowly run on every computer which logs into our domain. (I apologize if the above sounded stupid, im fairly new at this, but you get the idea)

That's essentially what I'm interested in...I'm not sure if it's even possible, and if not please let me know if there is another way of doing it.

I would also like to note that the login script would need to be compatible with both XP and 2000 version of windows.

Thanks in advance to anyone who can help me.

Who is Participating?
Robert Sutton JrConnect With a Mentor Senior Network ManagerCommented:
Does your Company use any Enterprise tools such as SMS or something similiar? If so, then it would make it simple to issue such batch file to all users on the domain in the login script..... If not, you may have no chioce in the matter and you will have to visit each workstation to actuate the Uninstall batch file.
1) In making the batch file you will need to find the Uninstall string in the re3gistry and use that in creating it.
2) When issuing the file, the problem I can see you running into is that ALL users on the Domain that don't have Admin rights, will not be able to initiate the Uninstall. therefore creating the need for you or someone else w. Admin rights to walk around and do it from 1 pc to another.
Adding to what Warlock mentioned, you can find the uninstall strings by looking at the following location in the registry and tracking down your program from the list: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.  You can apply tags such as /qb or /quiet to the end of the uninstall string to make the removal completely silent (keep in mind the command tags depend on the type of file, the ones I mentioned should work for .msi files).  
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.