Jump to content

Recommended Posts

Posted

We use wpkg (Main Page - WPKG | Open Source Software Deployment and Distribution) to deploy software to our workstations

 

The silent install xml files listed often use MSIEXEC to install the software silently

eg : Foxit Reader - WPKG | Open Source Software Deployment and Distribution


 

These are pretty standard lines. However the uninstall lines tend to come in two flavours and I don't know what the difference is between these two different methods. Can anyone tell me what the difference is please?

Sometimes the msi file is used

 


 

Sometimes a string similar to the following is used.

 


 

Is this code always the same for all computers installing that software? How do you find out which code (is there a name for it?) relates to which application?

 

Is there a preferred method or one that is considered best practice?

 

ChrisJ

Posted
One is specifying no interface and the other just ensures it doesn't ask to restart the computer. The code is specfic to the MSI package it's called a GUID.
Posted

To clarify link between GUID and MSI;

 

If you tell MSIEXEC to uninstall based on the GUID, it will go to the registry and look up the application based on the GUID that was in the MSI file when the software was installed. Once found, it will uninstall the package associated with the GUID.

 

If you tell MSIEXEC to uninstall based on the .MSI file, it will look up the 'Product' GUID in the MSI file, then go look this GUID up in the registry and uninstall the associated package.

 

In theory, every new MSI file package should have a unique Product GUID.

 

Windows is able to uninstall without the original MSI as it makes it's own copy of the MSI in %windir%\installer when the package is installed. Note that the MSI file gets renamed and has any installation files removed; it's just the database at this point. This is done support several features on Windows Installer such as install-on-demand and self-repair.

 

Least ways, that's how it was a few years back !

  • Thanks 1
Posted

In theory, every new MSI file package should have a unique Product GUID.

 

 

Sadly, that's not always the case - I've come across a few things where the same GUID is used for different versions of the package. This is a real pain when you want to uninstall version 1 and install version 2 for example!

Posted

I agree with SRochford's point.

 

I wonder if there is some confusion between Product GUIDs and Package GUIDs. IIRC, the Product GUID can remain the same for minor updates but the Package GUID should be unique.

 

According to Technet, the MSIEXEC command requires either a valid MSI file or a Package GUID. In other words, you have to you the exact same MSI for uninstall as was used for install.

 

In terms of best practise, my hunch would be that the GUID would be the way to go although your experience suggests this can be problematic. If you search the registry for 'UninstallString' you will find command lines that are used to uninstall Windows Installer based applications and they all seem to use the GUID.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...