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.

Chapter 10: Customizing Installation Behavior<br />

Using Custom Actions<br />

Table 10-1: Types of Custom Actions (cont.)<br />

Type of Action Description<br />

Standard DLL This type of action is an <strong>InstallShield</strong> extension that lets you call functions from<br />

C-callable DLLs. The type of function prototype that you select for the action<br />

(classic or new) determines which signature you must use for your function.<br />

• Classic—The prototype in this type of DLL must follow the same format<br />

that was used in early versions of <strong>InstallShield</strong> <strong>Express</strong>.<br />

• New—The prototype in this type of DLL uses the same signature that is<br />

required for MSI DLL custom actions. If you want to use this type of<br />

signature for a new custom action that you are adding to your project, it is<br />

recommended that you use an MSI DLL custom action instead of a<br />

standard DLL, since an MSI DLL action offers more flexible scheduling<br />

options.<br />

Important: Note that for standard DLL custom actions, a non-zero return value<br />

indicates success, and a return value of zero indicates failure. For MSI DLL<br />

custom actions, a return value of zero indicates success; non-zero return<br />

values indicate statuses such as failure or cancellation.<br />

Executable File This type of action launches an executable file that is included in your<br />

installation (as a temporary support file or installed with the product) or that<br />

already exists on the target system.<br />

A benefit of this action type is that a lot of operating system functionality is<br />

exposed in executable files. For example, this type of action lets your<br />

installation open text files and other common file types, set permissions on<br />

existing directories, and launch batch files.<br />

Executable-file actions do not have access to the running installation session.<br />

Thus, you cannot pass Windows Installer properties in to the executable file<br />

(except as command-line arguments) or back from the executable file (except<br />

through external storage, such as the registry or a file).<br />

Note that to open a document or launch a batch file, you must explicitly refer to<br />

an executable file that handles that type of document.<br />

VBScript or JScript This type of action runs VBScript or JScript code.<br />

Benefits of this action type include:<br />

• Script actions are often easy to implement.<br />

• Unlike executable-file actions, this type of action can use the Windows<br />

Installer API to access the running Windows Installer session and work with<br />

properties, directories, and so on.<br />

• This type of action can be useful for simple tasks such as string<br />

manipulation.<br />

Note that VBScript and JScript actions often trigger antivirus or antispyware<br />

programs when they access or modify the target system.<br />

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

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

Saved successfully!

Ooh no, something went wrong!