Hello,

I have a wix based installer that writes some registry values using the 
standard wix registry element a bit like:
> <RegistryValue Action="write" Type="string" Root="HKMU" 
> Key="Software\Company\Key" Name="KeyName" Value="1"/>
Is it possible for me to be able to read these values from a *immediate* 
custom action? If so when do I need to schedule it?

I've currently got an immediate custom action that is scheduled *after 
WriteRegistryValues* but it doesn't seem to be able to read the written 
entries: RegOpenKeyEx returns ERROR_FILE_NOT_FOUND when trying to open 
the relevant key with read access. Custom action xml is:
> <CustomAction Id="MyCustomAction" Impersonate="yes" Return="ignore" 
> Execute="immediate" BinaryKey="MyCustomActionDll" 
> DllEntry="MyCustomAction" />
and the sequencing is:
> <InstallExecuteSequence>
> <Custom Action="MyCustomAction" After="WriteRegistryValues">NOT 
> Installed</Custom>
> </InstallExecuteSequence>

*Other Notes*

  * In the example ALLUSERS is 1 so the registry values will end up in
    the HKEY_LOCAL_MACHINE key.
  * As a result of the above the installation is given elevated privileges.
  * I've got the custom action's impersonate value set to "yes" as there
    are various pieces of user information I want to access from the CA.
    AFAIK this shouldn't be an issue as long as I only want to *read*
    keys from HKEY_LOCAL_MACHINE, which is the case. Any modification
    happens in the HKEY_CURRENT_USER key.

*Environment*

  * Compiled using Wix v3.5
  * Installing on a Windows 7 Enterprise (SP1) machine

-- 
Liam
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to