09.12.2012 Views

InstallShield 2012 Express Edition User Guide - Knowledge Base ...

InstallShield 2012 Express Edition User Guide - Knowledge Base ...

InstallShield 2012 Express Edition User Guide - Knowledge Base ...

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 />

Any custom actions that make changes to the target system during an installation should be undone with<br />

a rollback execution custom action in the event of rollback. For example, if you have a custom action that<br />

creates a file, you should create a second custom action that deletes the file, and schedule the second<br />

action for rollback execution. (A rollback custom action should be scheduled before the custom action it<br />

reverses.)<br />

Commit Execution<br />

Commit execution actions do not run until the InstallFinalize action completes successfully. This means<br />

that they wait until the installation has completed transferring files, registering COM servers, and<br />

creating shortcuts and registry entries. Then, any actions that are set to commit execution launch in the<br />

order in which they appear in the sequence.<br />

For example, if you have a custom action that creates a temporary file, you should create a second<br />

custom action that deletes the file, and schedule it for commit execution.<br />

Deferred, Rollback, or Commit Execution in System Context<br />

Like deferred execution actions, deferred-execution-in-system-context actions do not launch until the<br />

script that generated by the Windows Installer is run. However, actions of this type execute with no user<br />

impersonation.<br />

Similarly, rollback-execution-in-system-context and commit-execution-in-system-context actions<br />

execute with no user impersonation.<br />

Because of the elevation of privileges on Windows Vista and later systems, deferred custom actions must<br />

be made in system context if they need to make system changes that require elevated privileges.<br />

Deferred custom actions in user context may not have elevated privileges even if an administrator runs<br />

the installation on a Windows Vista or later system, and thus should be avoided for custom actions<br />

requiring higher-level privileges.<br />

Note: Custom actions that run in the system context generally do not have access to network resources.<br />

Changing When Custom Actions Are Launched<br />

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

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

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

installation, maintenance, or uninstallation item.<br />

Task To change when a custom action is launched, do one of the following:<br />

• Drag the custom action from its current location to the new location.<br />

• Right-click the custom action and click Move Up or Move Down.<br />

• Click the custom action and then press CTRL+SHIFT+UP ARROW or CTRL+SHIFT+DOWN<br />

ARROW.<br />

The Custom Actions view is divided into the following main run-time categories:<br />

<strong>InstallShield</strong> <strong>2012</strong> <strong>Express</strong> <strong>Edition</strong> <strong>User</strong> <strong>Guide</strong> ISE-1800-UG01 231

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

Saved successfully!

Ooh no, something went wrong!