 |
| InstallShield MSI Project
|
InstallAware MSI Project
|
- Write a custom VBScript that reads from the desired text file. Include a function that lets you know whether or not the script has been executed by the Windows Installer engine.
|
- Select the MSIcode view.
|
- In an InstallShield Basic MSI project, right-click on the Custom Actions root node and choose Custom Action Wizard.
The Custom Action Wizard is displayed.
|
- Select a line in your project code.
|
- Click Next. The Basic Information Panel is displayed.
|
- Enter R in the line of code. The Read from Text File command is displayed. Click Enter.
|
- Enter the name of your custom action in the Name field. Click Next.
|
- In the Read from Text File window, enter the name of the file you want InstallAware to read from in the Read from File field.
|
- The Action Type panel is displayed.
Select Run VBScript code from the Type list.
|
- Enter a variable name to hold the read text. Click OK.
The code needed to read from a file on the target system is created and added to your project.
|
- Select Stored directly in the custom action from the Location list. Click Next. The In-Sequence Scripts panel is displayed.
|
|
- Copy and paste your VBScript into the field provided.
Click Next. The Additional Options panel is displayed.
|
|
- Select the Deferred execution in System context option from the In-Script Execution list. Click Next.
The Insert into Sequence panel is displayed.
|
|
-
Select After ResolveSource from the Install UI Sequence list. Click Next. The Summary panel is displayed. Click Finish.
|
|
- Build and test the setup, including running it in silent mode.
The custom action fails to execute. Maybe you used the wrong Windows Installer sequence.
|
|
- Repeat steps 2 through 8.
|
|
- On the Insert into Sequence panel, select After RegisterComPlus from the Install Execute sequence list. Click Next. The Summary panel is displayed. Click Finish.
|
|