cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Uninstall based upon GUID

Ok, this is my first post and I am pretty new to AdminStudio even though our company has owned a license for the past 4 or so years. Previous admin was promoted so I get to try to figure out how to use this product. So far it feels like somebody handed me a car and told me to replace the engine. Ok, where the heck do I start?

Specifically, here is my goal and my problem:

Goal: install a program (Barracuda Web Shield Agent) through Microsoft Systems Center Configuration Manager 2007 that filters web content for laptop/roaming users. Each department will get their own deactivation password so its a bit more locked down. This is done through a command line arguement given at install time. Other information such as whitelisted domains and ip addresses are specified on the same command line as well. For example:
BarracudaWSASetup.exe /s /v"/lvemo \setup.log /qn AUTH_KEY=reallylongkeyhereforpurewire ALLOW_REMOVE=1 APPLICATIONS=iexplore.exe|firefox.exe|chrome.exe|safari.exe BYPASS=10.*;192.168.*;172.16.*;172.19.*;172.22.*;172.23.*;172.24.*;64.15.17.*;172.25.*;*.internaldomain1.com;*.internaldomain2.com SERVICE_URL=ple1.proxy.purewire.com USER_MODE=0 ADS=1 PASSWORD=adminpasswordhere"

Problems:
1) Previous Application versions need to be uinstalled. I have a MSIEXEC /X GUID command for each version's GUID that can be run to uinstall the version. I would like to run a detection when the executable runs that looks for those GUIDS in the registry and if it finds them, it will uninstall them, reboot and pick the installation back up.

2) Because my command line above looks like an exe wrapped MSI file I am going to download the MSI version of this and design the install so each department gets its own settings through an MST file at install time, but how do I address issue number 1 above through the installshield designer?
(3) Replies
Hi There,

What I would first try is to use the built-in MSI functionality for removing previous versions--the Upgrade table.

Basically, you can create a new transform and insert entries into the Upgrade Table using Direct Editor, putting in the Upgrade codes for each previous version (or a single entry, in the case that they all share the same upgrade code). You get these upgrade codes by opening the MSI files in InstallShield or Orca, and looking at the Property table for the UpgradeCode property value.

As for a reboot, just navigate to the Installation Designer -> Custom Actions and Sequences -> Installation -> Execute, and right click on RemoveExistingProducts and select "Insert".

Then you'll choose to insert a Standard Action, and select ForceReboot.

If all goes well, using this *.mst file will do what you are looking for. But, of course, there's a lot that can go wrong, including a lot of things that are out of your hands -- the software vendor may not have designed their packages to be uninstalled in this fashion. So if you run into problems, I would give this a read first and see if it helps:

Major Upgrades
http://msdn.microsoft.com/en-us/library/aa369786(v=vs.85).aspx

Q113394: HOWTO: Troubleshooting Major Upgrades
http://kb.flexerasoftware.com/selfservice/viewContent.do?externalId=Q113394

And lastly, remember to log everything!

How to enable Windows Installer logging
http://support.microsoft.com/kb/223300
Thanks for the Pointers Cary. I think I followed your instructions and I know a bit more about the product than I did before. This thing is like a swiss army knife with 100,000 accessories.

The reason I wanted to do the MSIEXEC /X GUID is that each client has its own password for either itself or the department and there are about 20 departments. Making an installer that would be able to crank through the department passwords and try them all would just about be impossible and a lot of extra work, whereas if I can just read the registry, find the right guid, execute the proper MSIEXEC uninstall for that version, it won't check the password and will simply uninstall. I see where you were going with the Upgrade table and there are already entries there for the MSI from Barracuda, but due to the password issue I will need to get the system to a clean state through their method prior to installing the latest version.

If you ask me, it seems like a security hole but I guess they needed some way to recover from a lost password scenario. Is there a way to design an executable that digs throught the registry and looks for a Key, executing only the proper uninstall string if it finds it?
There is indeed a way to dig through the registry, but my thought is to use Windows installer API's where possible to handle this.

What do you have as input? The name of the product, the Upgrade Code, Product Code? What you are working with will depend how you have to put it together, be it calling API's or really just iterating through keys in the registry.