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
-- 
View this message in context: 
http://www.nabble.com/Windows-Installer---CustomAction-DLL-tf4116549.html#a11706592
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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

Reply via email to