Jump to content


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.
Photo

"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows


4 replies to this topic

subodh_jai

subodh_jai
  • Full Members
  • 17 posts

Posted 23 March 2010 - 15:13

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.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

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


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

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.

Attached Files


Regards
-Stein Åsmul

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

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

subodh_jai

subodh_jai
  • Full Members
  • 17 posts

Posted 25 March 2010 - 14:55

Stefan and Stein, Thanks for your help.