Hi,
I have a installer, which needs to do following steps -
1. Detect an already installed version.
2. if it exists, stop services.
3. install new files.
4. copy a file created by older version software into new directory.
5. start services.
For step4 I defined a custom action in C++ dll as follows -
<CustomAction Id='CopyFileDatabaseCA'
BinaryKey='IPValidationdll' DllEntry='copyFileDB' Execute='deferred'
Impersonate='no' Return = 'check'/>
*C++ function defined as follows - *
__declspec(dllexport) UINT __stdcall copyFileDB(MSIHANDLE hInstall)
{
try
{
char oldBatonSysDrive[MAX_PATH];
DWORD oldValueLen = MAX_PATH;
UINT uiResult = MsiGetProperty (hInstall, "OLDBATONSYSDRIVE",
oldBatonSysDrive, &oldValueLen);
char cNewPath[MAX_PATH];
DWORD newPathLen = MAX_PATH;
MsiGetProperty (hInstall, "BATONSYSDRIVE", cNewPath, &newPathLen);
MessageBox(NULL, oldBatonSysDrive, "Baton Install", MB_OK);
if( oldValueLen > 0)
{
//some code to copy file
}
return ERROR_SUCCESS;
}
catch(...)
{
return ERROR_SUCCESS;
}
}
line highlighted in red is not able to pick the value of property, whilw
other custom actions are able to find this value.
if remove Execute=deffered from this custom action then this custom
action is also able to pick value.
Regards,
Sanjay Rao
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users