Solved

Uninstall a program based on author

Posted on 2011-03-22
4
239 Views
Last Modified: 2012-05-11
Hi There.  We have an application that has a somewhat dirty install scheme.  Each update is it's own seperate uninstall.  Many of our PCs have upwards towards 60 MSI packages for a fully-updated suite.  There are some times that we need to do a complete uninstall/reinstall of the application.  I'm usually able to get a list by copying files with a certain author from c:\windows\installer, pasting into a new folder, doing a DIR /b > List.txt and adding an msiexec /x to the beginning of each line and a /qb! at the end of each line.  Run this and it works great.

I have a situation coming up where I will need to do this in one of our satellite offices (~35 people) and I would like to script this to run on every PC.  Only problem is that the uninstall MSI file names are not uniform cross-workstation.  I would like to be able to script this uninstall using perhaps some sort of for loop utilizing the Author information attached to the file.  Is there a way to do this?  Alternately, can I script the uninstalls using the uninstall registry keys?

I'd love to know, thanks!
0
Comment
Question by:SSGIT
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
Comment Utility
If this is really going to be author-based, I would loop through the entries under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\, and for each entry where there's "Publisher" with the value that fits the criteria, run what's found under UninstallString.

0
 

Author Comment

by:SSGIT
Comment Utility
Is there a way to grep that information out into something useable like a list I can point a VBScript or Batch script to?  I'm afraid I don't script THAT much in Windows.  
0
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
Comment Utility
If you know the specific products you want to uninstall, rather than want to find out by the author, then just collect those uninstall strings, and put them in a batch one after another, with /qb as you already know. Actually, the strings would differ by Product Code, so every command would be
msiexec /qb /x {ProductCode}

Of course any kind of script can be written as well, but this looks like a separate project.

0
 

Author Closing Comment

by:SSGIT
Comment Utility
Uninstall strings worked cross-platform even though the MSI names were different somehow.  Odd, but it worked.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Viewers will learn how to use the Hootsuite Dashboard.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

11 Experts available now in Live!

Get 1:1 Help Now