cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Burhan1875
Level 3

Importing InstallShield 11 to InstallShield 2010 => OnMoved() Event missing...

Hello,
i have converted my old Basic MSI Project (InstallSHield 11 Premier) to InstallShield 2010 Premier. Now i have seen, that the old Event Handlers OnBegin(), OnMoving(), OnMoved() and OnEnd() no longer are supported in the new InstallSHield 2010.
I have found a knowledgebase Article from Flexera which describes, that i must create custom actions for these handlers. I did, but it only worked for OnBegin() not for the others.

This is the description i found:

MyOnBegin
Immediate (default)
In the Installation User Interface sequence just after the SetupCompleteSuccess dialog. (In previous releases, OnBegin was called as a result of the ISMsiServerStartup custom action being called.)

MyOnMoving
Deferred in system context
In the Installation User Interface sequence just after the SetupCompleteSuccess dialog. (In previous releases, OnBegin was called as a result of the ISMsiServerStartup custom action being called.)

MyOnMoved
Deferred in system context
In the Installation Execute sequence, between the ScheduleReboot and InstallFinalize actions.

MyOnEnd
Deferred in system context
The last event in the Installation Execute sequence after the InstallFinalize action. (In previous releases, OnEnd was called after all other events as a result of the installation completing.)

Now, the problem is, that "OnBegin()" with the custom action works, but all other types not!
When i debug it jumps into the "OnBegin()" custom action but not in the other custom actions.
What is going wrong ?

Thanks in advance.
Labels (1)
0 Kudos
(6) Replies
Ajay_Ladsaria
Level 7

Hi,

There are some flaws in your authoring of the custom actions. The "Deferred Execution in System Context" custom actions have to be sequenced in the Execute Sequence between InstallInitialize and InstallFinalize.

Please do this and put in a MessageBox call in each of your InstallScript custom actions. Then try to run the installation without debugging it to see if you see your message boxes come up.

Regards,
Ajay
0 Kudos
Ajay_Ladsaria
Level 7

0 Kudos
Burhan1875
Level 3

Hello,
thank you for your answer. Teh message boxes come, but debugging does not work, even when i set the registry keys you refer to.
How can i debug deferred custom action ?
Thank you in advance.
0 Kudos
Ajay_Ladsaria
Level 7

It sounds like you have merge in the registry keys discussed in the following KB article:

Q112187: BUG: InstallScript Debugger Does Not Debug Deferred, Commit, or Rollback InstallScript Custom Actions
http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q112187&sliceId=

Is this correct?

Could you test in a brand-new sample project to see if you are able to debug a Deferred execution custom action?
0 Kudos
Burhan1875
Level 3

Hello,
i hve tried with a new project and a dferred custom action in system context, even here it does not work debugging it. The Script is executed, but the debugger does not stop at the deferred custom action.
0 Kudos
Ajay_Ladsaria
Level 7

Here are the steps I was able to use to debug InstallScript custom actions that are marked as "Deferred Execution in System Context":

1. I created a new basic msi project in IS 2010.
2. I added an empty feature and component.
3. I added a new default InstallScript file.
4. Added a MessageBox call in default MyFunction function.
5. Made a copy of MyFunction function to be called from a deferred execution CA.
6. Added two InstallScript custom actions. One is immediate and runs MyFunction, and the other is Deferred Execution in System Context and sequenced after InstallInitialize and runs the second function.
7. I built with default release options.
8. I added the following registry information to my IS 2010 system:
HKEY_CURRENT_USER\Software\InstallShield\ISEngine16.0
DebugISCustomActions DWORD 00000001
9. I opened a CMD prompt window and went to the Disk1 folder of the setup. Then I ran the setup with /v"ISSCRIPTDEBUG=1".
10. The script debugger opened up on the immediate CA function call. I then set a breakpoint in the other function.
11. The breakpoint in the other function (from deferred CA) was hit next.

Please confirm if the above steps work for you as well. If you move your setup to a different directory, then you probably need to also copy the Setup.dbg file found in the Script Files folder.

-Ajay
0 Kudos