Launching A Custom Action From A Dialog - Symantec WINDOWS INSTALLER EDITOR 7.0 SP2 - REFERENCE FOR WISE INSTALLATION STUDIO V1.0 Installation Manual

Table of Contents

Advertisement

Launching a Custom Action from a Dialog

Windows Installer Editor Reference
In the User Interface or Execute Immediate sequences, you can send Windows Installer
properties to the .DLL function as parameters. The property's current value is passed to
the function, and, if the function changes that value, the new value is put into the
corresponding property.
In the Execute Deferred sequence, the number of properties you can access is limited.
You can only access UserSID, CustomActionData, and ProductCode. CustomActionData
is filled with the property value of any Windows Installer property that has the same
name as the Custom Action.
See Obtaining Context Information for Deferred Execution Custom Actions in the
Windows Installer SDK Help.
Debugging a Call Custom DLL Custom Action
You can debug .DLL functions while you are running an installation. Debugging a .DLL is
different from using the Debugger for Windows Installer, which shows the run-time
environment of the .MSI. Debugging a .DLL shows your .DLL code in Microsoft Visual
Studio. The following are requirements for using .DLL debugging:
You authored the .DLL and have its source code on your computer.
You have Microsoft Visual Studio installed.
You are using one of the Call Custom DLL custom action types.
MSDEV.EXE is in your path for debugging.
To enable debugging, use Setup Editor > Product tab to set the property named
_WiseDebugMode to 1. Then test or run the installation. Microsoft Visual Studio opens
and attaches to the installation process, and a breakpoint is invoked near the start of
your .DLL. You need to step a few times to get out of Windows Installer compiled code
and into your .DLL code.
Note
The debugging method described above only works with the Call Custom DLL custom
action types. It does not work with the Call DLL custom action types.
You can use a control on a dialog box to run a custom action. Example: You can set a
button so that if the end user clicks it, the custom action runs.
1.
Select MSI Script.
2.
From Installation Mode, select All Custom Actions.
3.
Create a new custom action and configure it normally, but mark No Sequence on
the Location tab.
The action is not added to any sequence.
4.
In Setup Editor > Dialogs tab, right-click a dialog box and select Add > Button.
Make sure the button is not on top of a graphic. You can add other controls besides
buttons.
5.
On the Control tab of the button's Properties dialog box, enter the label for the
button in the Control Text list box.
Using MSI Script
509

Advertisement

Table of Contents
loading

This manual is also suitable for:

Windows installer editor 7.0 sp2

Table of Contents