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

Posted on 2007-10-19
Last Modified: 2009-03-20
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.

Question by:terryjacks
    LVL 15

    Accepted Solution

    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.
    LVL 1

    Expert Comment

    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).  

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    With the internet and the ease of information transference, many professional jobs can be done anywhere today.  Why should it make a difference whether an x-ray is read in India or the United States as long as the radiologist is qualified?   Outso…
    Article by: Leon
    Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
    This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
    XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now