?
Solved

Uninstall a program based on author

Posted on 2011-03-22
4
Medium Priority
?
252 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 35191170
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
ID: 35191337
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 2000 total points
ID: 35191532
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
ID: 35232235
Uninstall strings worked cross-platform even though the MSI names were different somehow.  Odd, but it worked.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Invest in your employees with these five simple steps to improve employee engagement and retention.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Suggested Courses

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