User Guide

498
Calling WiseScripts with Custom Actions
3. Add an Open/Close INSTALL.LOG script action with Open new installation log
marked and the log file path specified as %MAINDIR%\install.log.
This causes the WiseScript to create a log in the installation directory.
4. Add an Install File(s) script action and set:
Source Pathname for Unwise32.exe
Destination Pathname to %MAINDIR%\Unwise32.exe.
Unwise32.exe is located within the WiseScript Express directory under the Wise for
Windows Installer directory.
5. Add an Install File(s) script action and set:
Source Pathname for A.dll
Destination Pathname to %MAINDIR%\A.dll.
Add any other necessary script actions. (Example: You could edit registry entries, check
if a certain file or directory exists, or rename a file or directory.) For this example, the
CorePlus script installs only A.dll. For troubleshooting purposes, you might also want to
add a Display Message script action that shows the value of %MAINDIR%. This lets you
know when the WiseScript runs, and also gives you debugging abilities.
The sample WiseScript looks like this (the script lines are numbered for clarity):
1. Get Windows Installer Property INSTALLDIR into MAINDIR
2. Set Variable MAINDIR to %MAINDIR%
3. Open new installation log file %MAINDIR%\install.log
4. Install File C:\Program Files\Unwise32.exe to %MAINDIR%\Unwise32.exe
5. Install File C:\Plus\A.dll to %MAINDIR%\A.dll