09.12.2012 Views

InstallShield 2012 Spring Express Edition User Guide

InstallShield 2012 Spring Express Edition User Guide

InstallShield 2012 Spring Express Edition User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 10: Customizing Installation Behavior<br />

Using Custom Actions<br />

Both Msiquery.h and Msi.lib can be found in the Windows Installer SDK, which can be downloaded<br />

from Microsoft’s Web site. In addition to the two files listed above, the Windows Installer SDK contains<br />

Microsoft’s definitive documentation on the Windows Installer APIs.<br />

Adding a DLL Custom Action to Your Project<br />

The items in the Custom Actions view are organized by chronological order, according to when they are<br />

launched during installation or uninstallation. When you add a custom action to your project, you<br />

specify when the custom action should be launched by adding the action to the appropriate installation<br />

or uninstallation item.<br />

Task To add a DLL custom action to your project:<br />

1. In the View List under Define Setup Requirements and Actions, click Custom Actions.<br />

2. In the Custom Actions During Installation explorer, the Custom Actions During<br />

Maintenance explorer, or the Custom Actions During Uninstallation explorer, click the item<br />

that should contain the custom action that you want to create.<br />

3. Right-click the item and click New DLL. <strong>InstallShield</strong> adds a new custom action with the name<br />

NewCustomActionn (where n is a successive number).<br />

4. Type a name for the custom action.<br />

5. Configure the settings for the custom action.<br />

Configuring a DLL Custom Action’s Settings<br />

When you add a DLL file custom action to your project, you need to configure its settings.<br />

Task To configure the settings for a DLL custom action in your project:<br />

1. In the View List under Define Setup Requirements and Actions, click Custom Actions.<br />

2. In the Custom Actions During Installation explorer, the Custom Actions During<br />

Maintenance explorer, or the Custom Actions During Uninstallation explorer, click the item<br />

that should contain the custom action that you want to configure.<br />

3. Configure the settings in the grid on the right.<br />

Executable File Custom Actions<br />

You may need to launch a third-party installation because you cannot repackage another vendor’s<br />

installation. Or, maybe you want to play an .avi while the installation runs. If that is the case, you can<br />

create a custom action that launches an executable file.<br />

One of the supported custom action types is launching an executable in the installation. To learn how to<br />

create this type of custom action, see Adding an .exe Custom Action to Your Project.<br />

<strong>InstallShield</strong> <strong>2012</strong> <strong>Spring</strong> <strong>Express</strong> <strong>Edition</strong> <strong>User</strong> <strong>Guide</strong> ISE-1900-UG00 227

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!