After installation of a package we usually get this key created for a product “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\<Some GUID>. Here we don’t know how this GUID got generated as this information is no where mentioned in the .msi database or installation project also it does not seem generated during run time as I found it same on all the system where I installed this package.
We have requirement to get installation information programmatically which is available under this key but unable to complete the registry path as we don’t know the GUID value. Is there any way we can get value for this GUID? Please advice.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
Started by
subodh_jai
, Mar 23 2010 15:13
4 replies to this topic
Posted 24 March 2010 - 11:39
These entries are undocumented and shouldn't be used - they might change without notice. That said, here's an article that explains how Windows Installer modifies GUIDs when storing them in registry:
http://www.msigeek.c...installer-guids
http://www.msigeek.c...installer-guids
Stefan Krüger
InstallSite.org twitter facebook
Posted 25 March 2010 - 02:06
As Stefan says you should never access this registry key directly, it's the MSI database itself in its own storage format. Instead you should access Windows Installer via automation. Here is a sample of how you can invoke the windows installer engine via a vbscript:
Const msiUILevelNone = 2
Set objInstaller = CreateObject("WindowsInstaller.Installer")
objInstaller.UILevel = msiUILevelNone
objInstaller.InstallProduct( "foo.msi", "REMOVE=ALL")
Set objInstaller = Nothing
Attached is a sample vbscript from the MSI SDK which shows how to access info from the summary stream.
Const msiUILevelNone = 2
Set objInstaller = CreateObject("WindowsInstaller.Installer")
objInstaller.UILevel = msiUILevelNone
objInstaller.InstallProduct( "foo.msi", "REMOVE=ALL")
Set objInstaller = Nothing
Attached is a sample vbscript from the MSI SDK which shows how to access info from the summary stream.
Attached Files
Regards
-Stein Åsmul
-Stein Åsmul
Posted 25 March 2010 - 02:07
Come to think of it, if you don't have the MSI SDK installed it's annoying to have to download the whole SDK for some sample scripts. Here are the sample scripts in a bundle zip.
Attached Files
Edited by Glytzhkof, 25 March 2010 - 02:07.
Regards
-Stein Åsmul
-Stein Åsmul