I have a problem with WiX and C++ custom actions DLL: In my custom action I create a file and when I debug it, I got an access denied.
WiX file:
<CustomAction Id="ChangeConfig"
BinaryKey="PcmConfig"
DllEntry="ModifyConfigFile"
Execute="immediate"
Return="check"
HideTarget="no" />
<InstallExecuteSequence>
<Custom Action="ChangeConfig" Before="InstallFinalize" />
</InstallExecuteSequence>
Custom Action method:
HANDLE hFile = CreateFile(L"c:\Temp.txt", // name of the write
GENERIC_WRITE,
0,
NULL,
CREATE_NEW,
FILE_ATTRIBUTE_NORMAL,
NULL);
I saw some people suggested to change to run as deferred and Impersonate attribute set to "no", it seems it didn't call the custom action function at all.
Anyone a idea? Thanks in advance!