Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wix: setting RegistryKey Root HKMU

If I set the root attribute to HKMU in the RegistryKey, how do I know where to search (RegistrySearch root = HKCU or HKLM )in my registry for my RegistryValue. Or how can i set the root value dynamically?

like image 605
TimTiTim Avatar asked Jun 09 '11 09:06

TimTiTim


2 Answers

Usually this is done by using two searches with the same property: one search for HKLM and another one for HKCU.

The following scenarios can then occur:

  • first search finds the value and sets the property; in this case the second search result is ignored because its property was already sets by the first search
  • second search find the value and sets the property
  • both searches find nothing and the property is empty
like image 183
rmrrm Avatar answered Nov 11 '22 04:11

rmrrm


my quick idea you are requesting the install location of that component from the installer.

this can done via installer api. if you are using the on demand stuff, you have to query the installer anyway.

you can use the MsiGetComponentPathEx of MsiGetComponentPath function for that:

  • MsiGetComponentPathEx in MSDN
  • MsiGetComponentPath in MSDN
like image 23
coding Bott Avatar answered Nov 11 '22 03:11

coding Bott