It always succeeds because you always return ERROR_SUCCESS. The list of
possible return values is here:
https://msdn2.microsoft.com/en-us/library/aa368072.aspx
Also make sure you have [EMAIL PROTECTED]"check"
Rob
Naresh Krishna Kumar K wrote:
> Hi,
>
> I am creating a Custom Action DLL using VC++. My Custom Action DLL source
> code is given below:
>
> #pragma comment(lib, "msi.lib")
> #include "stdafx.h"
>
> BOOL APIENTRY DllMain( HMODULE hModule,
> DWORD ul_reason_for_call,
> LPVOID lpReserved
> )
> {
> return TRUE;
> }
>
>
> UINT MsiMessageBox(MSIHANDLE hInstall,TCHAR* pszMsg,DWORD dwOptions)
> {
> if( NULL==hInstall || NULL==pszMsg )
> {
> return -1;
> }
> PMSIHANDLE hRec = MsiCreateRecord(2);
> MsiRecordSetString(hRec,0,pszMsg);
> UINT uiRet =
> MsiProcessMessage(hInstall,INSTALLMESSAGE(INSTALLMESSAGE_USER
> |dwOptions),hRec);
> return uiRet;
> }
>
> UINT __stdcall FirstAction(MSIHANDLE hInstall)
> {
>
> if(MsiMessageBox(hInstall, TEXT("Do you want to continue setup?"),
> MB_OKCANCEL | MB_ICONEXCLAMATION) == IDOK)
> {
> ShellExecute
> (NULL,_T("open"),_T("http://microsoft.com/downloads"),NULL,NULL,SW_SHOWNORMAL);
> }
> else
> {
> Exit the MSI.
> }
>
> return ERROR_SUCCESS;
> }
>
> The above code displays the message when installing the .msi file whether
> the user want to download any prerequisite software needed for the .msi
> file. If the user clicks Ok button, the code will take the user to the
> download page. If the user clicks cancel button, the code should exit the
> user from the msi installation. But the issue is even after clicking cancel
> button, the welcome dialog page comes up. Is there any methods or properties
> in Windows Installer which will exit the user from installing the .msi
> application.
>
> I have created a Binary element and Custom element and CustomAction element
> in the .wxs file.
>
> Thanks,
> Naresh Krishna Kumar. K
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users