[wix-users] [WIX]: Issue while writing Registry Key using File in MSI

Dileep S dileep.sanampudi at gmail.com
Thu Aug 27 20:57:55 PDT 2015

Hi All,

I have created a sample C++ exe to write Registry Key in the following
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion

I have packaged this "Sample.exe" using WIX script.

I have written custom action in *.WXS file as below:

<CustomAction Id="InstallDRV" Directory="INSTALLDIR" Execute="deferred"
ExeCommand="[$(var.RootDirID)]$(var.EXEFileName)" Impersonate="no"
Return="asyncNoWait" />

"Sample.exe" should write the registry key which was specified after
extracting the MSI package.

After extracting the MSI package, "Sample.exe" launches and written a
registry key in the below location not in the specified location:
HKEY_USERS\.DEFAULT\Software\Microsoft\Windows NT\CurrentVersion\Windows

How to resolve this issue?

Is there any property need to be add in *.WXS file?

Thanks in advance.

More information about the wix-users mailing list