views:

194

answers:

1

I'm trying to use Custom Action to create my progressbar, the bar moveing works is correctly. However, it is not displaying Custom Action Name or any additional text that I try to add. Does anybody know why? Thanks.

UINT __stdcall CAProgress(MSIHANDLE hInstall) { char* customActionName = TEXT("Update Database Now"); char* message = TEXT("Incrementing the Progress Bar..."); char* messageTemplate = TEXT("Incrementing tick [1] of [2]");

 InitializeProgressBar(hInstall, customActionName, 
            message, messageTemplate, maxSteps, stepSize);

 // loop need put here, if put inside of <DoUpgrateDatabase>, 
    // it does not work correctly
 for (i = 0, lLen = 0; i < UpdateTblSize; i ++)
 {
     // get current database length

     UpdateProgressBar(hInstall, lLen, stepSize, maxSteps);


 }

}

UINT InitializeProgressBar(MSIHANDLE hInstall, char* customActionName, char* message, char* messageTemplate, int maxSteps, int stepSize) { PMSIHANDLE hProgressRec = MsiCreateRecord(3); int totalTicks = maxSteps; UINT retVal = 0;

 if (retVal == IDCANCEL)
     return ERROR_INSTALL_USEREXIT;

 MsiRecordSetString(hProgressRec, 1, customActionName);
 MsiRecordSetString(hProgressRec, 2, message);
 MsiRecordSetString(hProgressRec, 3, messageTemplate);
 retVal = MsiProcessMessage(hInstall, INSTALLMESSAGE_ACTIONSTART, 
            hProgressRec);

 if (retVal == IDCANCEL)
     return ERROR_INSTALL_USEREXIT;

 else
     return ERROR_SUCCESS;

}

UINT UpdateProgressBar(MSIHANDLE hInstall, int step, int stepSize, int maxSteps) {

}

A: 

Hi

I am also trying to show the progress bar while running the custom action. But it is not working. Can you please let me know how you achieve this ?

Please help me on this ?

Regards, Vel

Velu