InstallAware for Windows Installer
 

Using the Script Editor

The script editor is where you create the heart of your installation. The setup script drives the entire installation, determines your setup logic, and modifies the target system. You will frequently work in the script editor while authoring your installation. The script editor is entirely visual, and has a pseudo-code appearance.

Writing your Setup Script

When working in the script editor, you will add commands that perform setup actions, edit existing commands and fine tune their behavior, and of course remove commands which you wish to eliminate.

Adding Commands

The list of available commands is displayed to the left of the installation script. To add a command:

  • Type directly using the keyboard while the script has the focus. A drop-down menu opens with command names that match the letters that you have typed so far. Press ENTER to choose the matching command that is displayed, or use the UP - DOWN arrow keys to navigate to the command you wish to add to your script, pressing ENTER when the command you wish to insert is displayed.
  • From the command palette, select the command you wish to add using the keyboard, and press ENTER. The command will be added on top of the script item selected in the installation script.
  • Drag and drop the command from the command palette to the installation script. The command will be added on top of the script item you release the mouse button on.

Editing Commands

  1. Using the mouse or the arrow keys, navigate in your script to the command you wish to edit.
  2. Double-click the command, or press ENTER.
  3. If the command has options you can edit, a dialog box will appear allowing you to make your changes.

Removing Commands

  1. Using the mouse or the keyboard, highlight the lines you wish to remove.
  2. Press DELETE.

Script Editor Features

The script editor has several convenient features you may use while working with your setup code.

Clipboard Functions

  1. Using the mouse or keyboard, highlight the code to cut or copy. Or, select the code you wish to paste above.
  2. Right-click the code, and choose Cut, Copy, or Paste. You may also use the shortcuts CTRL+X, CTRL+C, CTRL+V.
  3. If you want to copy code in human readable form, choose Copy as Text. You may also use the shortcut CTRL+SHIFT+C.

Search and Replace

  • To search for a line of code containing specific text, type CTRL+F.
  • To replace occurences of some text with others, type CTRL+R.

Using Code Navigation Drop-Downs

  1. First select the class of script items to navigate to. For instance, choose Web Media Blocks on the left combo box if you want to jump to places in your code where web media blocks have been declared.
  2. Next, select the particular script item to go to. Opening the combo box on the right reveals the matching elements in your script of the chosen class above. Pick one of the items to navigate to that item.
  3. If the right combo box has no contents, then the current script has no items of the chosen class in the first step above.

Moving Code Up or Down

  1. Using the mouse or keyboard, highlight the code to move.
  2. Right-click the code, and choose Move Up or Move Down.

Commenting Code

  1. Using the mouse or keyboard, highlight the code to comment out (or comment in, if it is already commented out).
  2. Right-click the code, and choose Comment Out/In.

Navigating Tabs

  • To move between tabs, click the tabs directly, or use CTRL+LEFT or CTRL+SHIFT+TAB to move to the next left tab, or use CTRL+RIGHT or CTRL+TAB to move to the next right tab.

Code Folding Regions

  • To fold all regions, right click the script, then choose Fold All Regions.
  • To unfold all regions, right click the script, then choose Unfold All Regions.
  • To toggle the folded state of a region, double-click the region line with the mouse, or press CTRL+ENTER.
  • To edit the name of a folded region, select the region line and press ENTER.

Bookmarks

  • To create a bookmark, position the cursor in the line to bookmark, then hold down CTRL+SHIFT and choose a number between 0 and 9. This number becomes the unique identifier of your bookmark.
  • To navigate to a bookmark, hold down CTRL, and type the number of the bookmark to navigate to (between 0 and 9).
  • To remove an existing bookmark, navigate to the bookmark, and re-create the bookmark.
  • Re-creating an existing bookmark on another line moves the bookmark to that line.

Undo and Redo

  • To undo changes, use the shortcut CTRL+Z, or right click the script and then choose Undo.
  • To redo changes, use the shortcut CTRL+Y, or right click the script and then choose Redo. Making any script changes after an undo operation, other than a further undo or redo operation, will lose all redo history.
  • Switching to the visual portion of the InstallAware IDE will lose all undo and redo history for your main script file, but will not lose any history for any include files.

IntelliScan

Script lines which build source files into your installation will be displayed in strikeout font when no matching source files are found, helping you save time by avoiding broken builds.

IntelliScan supports compiler variables and resolves wildcards where appropriate for the underlying commands. It also supports relative paths (. and ..) as well as environment variables (such as %TMP%).