PDA

View Full Version : Basic MSI Projects that Have InstallScript Custom Actions



Jennifer
05-11-2006, 01:59 PM
Can someone elaborate on this excerpt from the release notes:

Basic MSI Projects that Have InstallScript Custom Actions
The predefined InstallScript events are no longer available in Basic MSI projects that have InstallScript custom actions. Therefore, if you have an InstallShield 11.5 or earlier Basic MSI project that has script code in any events, you must move that code to one or more InstallScript custom actions.

Is it referring to events taht are in teh dialogs?

RobertDickau
05-11-2006, 03:15 PM
I think that's referring to InstallScript events such as OnBegin and OnEnd.

DebbieL
05-11-2006, 03:46 PM
In InstallShield 11.5 and earlier, the following InstallScript events were available for Basic MSI projects:

OnBegin
OnMoving
OnMoved
OnEnd

These events are no longer supported in Basic MSI projects, and they are no longer called once an 11.5 or earlier project is built in InstallShield 12. (These events will still compile; they just won't be called.)

If you have these events in your project, you will need to manually schedule custom actions that call these functions.

Begin by renaming the events to an alternate name to avoid conflicts with existing function prototypes automatically included in ifx.h. For example:

MyOnBegin
MyOnMoving
MyOnMoved
MyOnEnd

Also, update the existing functions to take a single HWND parameter:

function MyOnBegin(hMSI)
begin
end;

Add appropriate prototypes for these new functions:

export prototype MyOnBegin(HWND);
export prototype MyOnEnd(HWND);
export prototype MyOnMoved(HWND);
export prototype MyOnMoving(HWND);
Then create InstallScript custom actions to add these events. To match the previous functionality as closely as possible, the events should be scheduled as follows:

MyOnBegin - In the Installation User Interface sequence just after SetupCompleteSuccess. (In previous releases, OnBegin was called as a result of the IsMsiServerStartup custom action being called.)
MyOnMoving - In the Installation Execute sequence, between InstallInitialize and AllocateRegistrySpace.
MyOnMoved - In the Installation Execute sequence, between ScheduleReboot and InstallFinalize.
MyOnEnd - The last event in the Installation - Execute sequence after InstallFinalize. (In previous releases, OnEnd was called after all other events as a result of the installation completing.)

I'm working on a Knowledge Base article that contains this kind of information. The release notes will have a link to this KB article.

I hope that helps.

Sincerely,
Debbie Landers
Macrovision Corporation

Jennifer
05-11-2006, 03:55 PM
I understand now. Thanks!