views:

188

answers:

1

This question is about an installation/uninstallation framework i am writing. For uninstallation i use the following mechanism: msiexec /X {GUID} where GUID is the registrykey that is generated in the uninstall location of the registry hive : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.

For one of the softwares, when i install Microsoft Visual C++ 2008 SP1 Redistributable it generates a GUID {9A25302D-30C0-39D9-BD6F-21E6EC160475} in XP.

However the same software generates a GUID of {1F1C2DFC-2D24-3E06-BCB8-725134ADF989} in Windows 7.

If I uninstall the software and reinstall it in XP and Windows 7 i get the same above mentioned GUIDs again and again.

So why is the GUID different for XP and Windows 7? Can I be sure that it will be the same on a given operating System (i.e it will always be {9A25302D-30C0-39D9-BD6F-21E6EC160475} in XP for VC++ 2008 SP1 Redist.) ? What is the mechanism that Windows uses to generate these GUIDs (different for XP and Windows 7 in this case).?

There are a few other softwares(like Acrobat, RealVNC, etc) where the GUID is the same for Windows 7 and XP.

+1  A: 

Most applications that use same setup for different versions of windows will have same guid at registry hive.

While some applications use conditional installing by looking up into windows version... in result GUIDs will be different in registry hive. this may work even both windows installer is same, installer can run different setups inside main setup by conditions like windows version, etc...

nooneelse