Hello Wix users,
My requirement:
When I start a Custom action (installing a MSU package, which take considerable
time) I want to remove the cancel button, coz I don't want people to cancel the
installation during the MSU installation.
My Installation:
1. A DLL to remove the cancel button
extern "C" UINT __stdcall HideCancelButton(MSIHANDLE hInstall)
{
PMSIHANDLE hRecord = MsiCreateRecord(2);
if ( !hRecord)
return ERROR_INSTALL_FAILURE;
if (ERROR_SUCCESS != MsiRecordSetInteger(hRecord, 1, 2)
|| ERROR_SUCCESS != MsiRecordSetInteger(hRecord, 2, 0))
return ERROR_INSTALL_FAILURE;
MsiProcessMessage(hInstall, INSTALLMESSAGE_COMMONDATA, hRecord);
return ERROR_SUCCESS;
}
2. Declared the custom action into my WIX file as follows:
<CustomAction Id="HidingCancel_XP" Return="check" Execute="immediate"
BinaryKey="HideCancel" DllEntry="HideCancelButton" />
3. Scheduled the custom action as follows:
<Custom Action="HidingCancel_XP" Before="LaunchPkgInstaller"><![CDATA[(NOT
Installed Or REMOVE=ALL) And (VersionNT >= 500)And (VersionNT < 600)]]></Custom>
With similar setup for Vista, the MSI works perfect but on XP, the custom
action fails as
Action ended 23:35:40: INSTALL. Return Value 3.
Q1. Does it depend on the MSIEXEC version?, if so how can I install latest
version of msiexec on XP?
Q2. If anybody has faced this problem and found out the solution please let me
know ?
Any help would be greatly appreciated.
Thanks,
Subhash
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users