Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Uninstall a program based on author

Posted on 2011-03-22
4
Medium Priority
?
254 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

618 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