Windows Installer Editor Reference
499
Using MSI Script
Calling a WiseScript .EXE versus calling a regular .EXE
Creating a custom action that calls a WiseScript .EXE is similar to calling a regular .EXE,
except that communication can take place between Windows Installer and WiseScript.
This is possible through the use of the Get Windows Installer Property, Set Windows
Installer Property, and Evaluate Windows Installer Condition actions in the WiseScript.
For information on these actions, see About WiseScript Actions in the WiseScript Editor
Help.
See also:
Troubleshooting: When WiseScript Custom Actions Fail on Windows Vista or later
on
page 503
Run WiseScript From Destination
on page 534
Run WiseScript From Installation
on page 535
Run WiseScript From Installed Files
on page 536
About Script Editor in the WiseScript Editor Help
Examples of WiseScripts You Run From an .MSI
This section provides examples of how to use WiseScripts that are called by a Windows
Installer installation.
For script examples, see:
z
Using a WiseScript to Parse a Path
on page 499
z
Using a WiseScript to Install a License File
on page 500
z
Uninstalling Changes Made by a WiseScript
on page 501
Using a WiseScript to Parse a Path
Because the Microsoft Windows Installer technology does not allow for parsing, you
cannot use it to create an installation that extracts a path from the registry and then
parses the path to isolate the file name into a property. However, you can send the path
to a WiseScript executable, do the parsing, then send the file name back in a Windows
Installer property.
Example: You extract the path C:\Program Files\Application\Application.exe, use
WiseScript to parse the file name, Application.exe, and send the file name back in a
Windows Installer property.
To use a WiseScript to parse a path
1. Write a WiseScript that uses:
Get Windows Installer Property script action to get the property named
APPLICATION_PATH into a temporary variable.
Parse String script action on the temporary variable to put the file name into
another temporary variable.
Set Windows Installer Property script action to put the file name back into the
Windows Installer property APPLICATION_PATH.
2. In Installation Expert, use the System Search page to get a registry entry that
consists of a full path. Put the path into a property named APPLICATION_PATH.