Solved

Uninstall a program based on author

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to do advance search in Windows 2008? 11 37
local administrator password solution 26 73
Problem to error 4 43
Searching good PDF to OCR 7 33
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

919 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

23 Experts available now in Live!

Get 1:1 Help Now