dllinstallshieldmerge-module

MSI DLL Custom Actions is not working well in installshiled


I have created merge module project in InstallShield 2014.

I have added Custom Action in using CustomActions.dll.

This CustomAction dll has Install Function.

Example: customactions.dll

BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
return TRUE;
}

UINT __stdcall Install ( MSIHANDLE hModule )
{
MessageBox(NULL, "Hello world", "CustomAction", MB_OK);
return ERROR_SUCCESS;
}

UINT __stdcall SampleFunction2 ( MSIHANDLE hModule )
{
MessageBox(NULL, "Hello world", "CustomAction", MB_OK);
return ERROR_SUCCESS;
}

After that,

I have built merge module project.

I have added merge module in Basic MSI Project.

I have built basic project.

I have installed using newly built installer.

I am unable to found message-box of custom action. it means custom action is not executed.

installshield

IMAGE: https://i.imgsafe.org/0ca963f930.png


Solution

    1. You need to first create the custom action in merge module project.
    2. Built merge module and add this merge module file in Basic MSI Project.
    3. Extract "Behaviour and Logic" in "Installation Designer" Tab.
    4. Insert Custom Action in Sequences in "Custom Actions and Sequences".

    PFA: Screenshot for more info. Insert Custom Action

    1. Add Custom Action in "Merge Module Custom Action" Option in "Insert Action".

    PFA: Screenshot for more info enter image description here

    1. Select custom action you want to add in Basic Project and Click "OK"
    2. You need to set which sequences after/before custom action execute.

    After that, I built Basic MSI Project. Custom Action function(Install Function) hit when I execute setup.exe.