Solved

Uninstall a program based on author

Posted on 2011-03-22
4
251 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 500 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

Don't Miss ATEN at InfoComm 2017!

Visit booth #2167 to see the  new ATEN VM3200 32 x 32 Modular Matrix Switch. Other highlights include the VE8950 4K HDMI Over IP Extender, VS1912 12-Port DP Video Wall Media Player  and VK2100 ATEN Control System. Register now with Free Pass Code ATEN288!

Question has a verified solution.

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

Configuring Remote Assistance for use with SCCM
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

691 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