- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to add event handler to script for basic MSI project
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
How to add event handler to script for basic MSI project
prototype OnInstalling();
function OnInstalling()
begin
MessageBox("123", INFORMATION);
end;
When I run the project, I did not get message box.
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Chad
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
"Basic MSI" (I'm not sure why Flexera calls it that, but I assume to distinguish it from their "InstallScript MSI" projects) is just "MSI" as far as Microsoft is concerned. It is a bit different and you do not bother with the older InstallScript event handlers.
There is a couple of different sequences in MSI, UI and Execute, and you schedule the scripts/custom actions to run at the appropriate time in one or both sequences. Or you can have a script run during a dialog box action (DoAction)
https://msdn.microsoft.com/en-us/library/aa368322(v=vs.85).aspx
It is a bit of a change of thought process, but anything is doable, especially when you consider you can call out to a C# DTF Custom Action as Christopher Painter describes here. In other words, from within an installer it should be possible to do anything that C# allows a person to do in code. Practically anything is possible.
http://blog.deploymentengineering.com/2008/05/deployment-tools-foundation-dtf-custom.html
The easiest way to get started with DTF custom actions is to install WiX on a system with Visual Studio installed. This gives a new project type under "Windows Installer XML" of "C# Custom Action Project". These DLLs can be called equally well from InstallShield as from WiX.
That's why Chris calls it "ISWiX" - it combines some of InstallShield abilities with some of WiX abilities.
Once you get a handle on that then it is easy to accomplish anything desired.
I hope that is helpful.
Chad
![](/skins/images/3D58A107233697761525865A3CEDC448/responsive_peak/images/icon_anonymous_message.png)