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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

sInstalldir = Session.Property("INSTALLDIR")<br />

' Show it.<br />

MsgBox sInstalldir<br />

' Check to see if a file exists<br />

Dim pFs<br />

Set pFs = CreateObject("Scripting.FileSystemObject")<br />

Dim sSomeFile<br />

sSomeFile = sInstalldir & "31337.txt"<br />

If pFs.FileExists(sSomeFile) Then<br />

' If it exists, change INSTALLDIR<br />

Session.Property("INSTALLDIR") = sInstalldir & "New"<br />

End If<br />

Adding a VBScript or JScript Custom Action to Your Project<br />

Chapter 10: Customizing Installation Behavior<br />

Using Custom Actions<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 add a VBScript or JScript 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 VBScript or New JScript. <strong>InstallShield</strong> adds a new custom<br />

action with the name 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 VBScript or JScript Custom Action’s Settings<br />

When you add a VBScript or JScript custom action to your project, you need to configure its settings.<br />

Task To configure the settings for a VBScript or JScript 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 or the Custom Actions during<br />

Uninstallation explorer, click the custom action that you want to configure.<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!