Introduction 'Initial Setup' Page 'Setup' Page 'Dir' Page 'Icons' Page 'INI' Page 'Registry' Page 'Run' Page 'Delete' Page 'Spanning' Page 'Finish' Page 'Listing' Page 'Options' Page Reusing Scripts

ScriptMaker Tutorial

The [Files] Page



This is where you select the files that you want to include in the installation. Files can be added individually, with separate options set for each file, or several files may be added at once, in which case they will all share the same options. In this tutorial we will assume that you are adding the files individually.

Selecting a file to include in the installation can be done, either by typing the full path and filename into the Source File field, or more usually by clicking the "browse" button at the right of the field. Files can also be "dragged" onto the [Files] page from Windows Explorer. If you type the name of the file manually into the Source File field, you can include wildcards (* and ?), but in this case ScriptMaker cannot check that the files exist. Entries like this will appear on a green background in the Files grid.

The Destination Filename field lets you set the location where the file will be installed during installation and also, if you wish, to change the name of the installed file. By default ScriptMaker enters {app}\AppName into this field. You will almost always want to keep the same filename, and use Directory Constants such as {app} or {win} in the path. These Directory Constants can be accessed quickly by right-clicking on the Destination Filename field and choosing from the context menu. If you have set up additional directories on the [Dir] page, these will also be available from the context menu.

Adding Complete Directories

If you need to add complete directories of files to the file list, the simplest way is to drag and drop the directory from Windows Explorer. All the files in the directory will be added to the file list as well as any sub-directories and their files.

When the directory is dropped onto the [Files] page a dialog will appear so that you can set the destination directory for each of the directories and sub-directories you have chosen. At the top of the dialog you can alter the root destination directory (initially set to {app} - the directory chosen for the installation by the user. Changing the root directory and clicking the Apply button changes the root for all of the dropped directories and sub-directories.

The chosen files are added directly to the files grid (you do not have to click the Add button as you do with files. The installation options, file attributes, etc., for all the files will be those which were set on the [Files] page at the time you dropped the directory onto the page, so these should be chosen before dragging and dropping (see below). If some of the files require different options, see the section on Changing File Properties below.

As well as adding the files in the chosen directory and its sub-directories, the [Dirs] page will be updated to include the new directories.

File Options

For each file you can set a number of options.

File options

Selecting the Confirm Overwrite option makes Setup ask the user to confirm before copying the file if it already exists. Replace on Restart will usually be used when replacing Windows core files. If the file is in use when the installation takes place, Setup will not be able to replace it. Setup will therefore register the file so that it will be replaced when Windows is next rebooted. The user will be prompted to restart the computer when installation finishes. You should note the following extract from the Inno Setup Help File: "To maintain compatibility with Windows 95/98 and 3.1, long filenames should not be used on an entry with this flag. Only '8.3' filenames are supported. (NT does not have this limitation.) "

The Never Uninstall option, if selected, will prevent the file from being uninstalled. It should only be used on rare occasions and is intended to be used when installing a very common shared file such as CTL3DV2.DLL which is used by other applications. This option will usually be used in conjunction with the Only if does not exist copying option.

The Shared File option makes Setup use the Windows shared file counting feature. Most files which are installed in the Windows\System folder will need to use this option including .OCX and .DPL files, but it should not be used with MFC DLL's, which should instead use the Only if does not exist copying option. Files using this option which are installed on Windows NT 3.51 systems will never be deleted.

For files which need to be "registered" with the OLE server, select the Register Server option. This will make Setup register the file on installation and de-register it when the application is uninstalled.

If your project contains a "readme" file, you can use the Is Readme File option. With this option selected, Setup will ask the user whether he/she wants to read the file when installation is complete. Only one file can be marked with this option. Setup will use the default application for the file type in order to display it, and the readme file should therefore normally have an extension like .txt or .doc.

The Delete After Installation option can be used to make Setup install the file normally and then delete it after installation is complete. An example of the use of this option might be when certain data is required by an application which is run during installation but is then no longer required.

The Compare TimeStamp option is an unusual and rarely used one. Normally, if a file exists on the user's system and has the same version number as the one you are installing, the file will not be overwritten. When this option is selected the timestamps of the two files are also compared and the existing file is overwritten if its timestamp is earlier than the one in your installation. This option has no effect if the copy mode (see below) is not either Copy Normally or Only If Newer.

If the file is a Type Library which needs to be registered, check the Register Type Library checkbox. Note that this flag cannot be used in conjunction with the Replace on Restart flag.

The External file flag should be used if the file you are adding is not to be compiled into the actual setup file but is to be included as a separate file with the setup. For example, you might have a registration file which is customised for each user and cannot therefore be included in the compiled setup.

If an External file cannot be found during installation, Inno Setup will give a warning message. This message can be avoided by using the Skip if ext. file does not exist option. Note that this option only affects external files, it cannot be used with other files.

If the file you are adding to the project is a font file you will need to select the Install Font option. When you select this option it will reveal the Font Name field (which is normally hidden) and replace the Source File edit box with a dropdown list of installed fonts. If the font is not a TrueType font, you should also select the Not TrueType option. Selecting a font name in the dropdown list will automatically insert the proper filename and the actual font name in the appropriate edit boxes. It will also set the destination to the {fonts} folder and set the Only if does not exist and Never uninstall flags.

Occasionally you may want to add a font which is not actually installed on your machine, in which case it will not appear in the list of fonts. Selecting "(Browse)" in the dropdown list will open the normal "File Open" dialog to allow you to select the font. Remember that you will have to enter the Font Name field yourself in this case (i.e. the name which appears when you double-click the file in the fonts folder).

Setup normally asks the user for confirmation before overwriting a read-only file. If the Overwrite Read Only Files checkbox is checked, read-only files will be overwritten without querying.

Marking the Main Executable File and Running the Program after Installation

One, and only one, executable file may be marked using the Is Main Exe File checkbox. If Check Executable Version Number has been selected on the [Options] page, the marked file will be used when checking the version number. If there is only one executable file in the project, or if the main file name matches the Application Name on the [Initial Setup] page, the correct file will be used anyway, even if it is not marked. However, if the option to Run Exe after install has been chosen on the [Initial Setup] page, it is mandatory to mark the file using the Is Main Exe File checkbox. If the file needs parameters when it is run, these can be added in the Params field.

Copying Modes

Most files will be installed using the Copy normally mode. In this mode, if the file being installed already exists on the user's computer and is a later version number, the user will be asked whether it should be replaced or not. The Only if newer mode is similar to the Copy Normally mode except that the user is not asked whether the file should be replaced - it will never be replaced if the existing file is newer than the one being installed.

Using the Only if does not exist mode, Setup will only install the file if it does not already exist on the user's computer (regardless of version numbers). The Always overwrite mode forces Setup to install the file even if a newer version already exists on the user's computer.

File Attributes

Normally no attributes are assigned to a file when it is installed. However each file can, if you wish, be given one or more of the Read only, Hidden or System attributes when it is installed.

Windows Version Version button

Each file may have a lowest and/or a highest Windows version outside which range it will not be installed. Normally this will be set on the [Initial Setup] page, but individual files may need a different setting. In this case, click the Windows Version button and you will be able to select a Min. Windows Version and Only install if below version for the current file. Note that the same options are also available on the [Dir], [Icons] and [Run] pages.

The Files List

Once you have set all the required options for the file, click the Add button to add it to the list of files. You can remove a file from the file list by clicking it to highlight it, then clicking the Delete button. You can quickly delete all the files from the files list by right-clicking the list and choosing Delete All from the context menu.

If you want to change the options for a file in the file list, or edit it in some other way, double-click the appropriate file in the file list. This will remove it from the list and place it back at the top of the page. You can then edit it as required and click the Add button to add it back into the list.

See also the Notes Regarding the Files Grid section below.

Installing Borland's Database Engine (BDE) Add BDE button

If your project requires the BDE to be installed, you can quickly add the necessary file (bdeinst.dll) by clicking the Add BDE button . The first time you use this option you will be asked to locate bdeinst.dll and instructions will be given on how to extract this file from the file bdeinst.cab.

Visual Basic Installations VB Inst. button

If your project is in Visual Basic 4, 5 or 6, you can quickly add the necessary files by using the VB Inst. button or checkbox. The first time you use this option you should click the button. You will then be asked which version of Visual Basic you are using, and the location of a series of files on your hard disk. If you need to change this information later, you should again click the button. Once you have given the necessary information you can in future simply check the VB Inst. checkbox. You should note that the information about which files are required has been taken from a posting on the Inno Setup bulletin board and has not been tested by me in any way - the onus is on you, the VB programmer, to make sure that the installation works correctly. As I am not a VB programmer I cannot undertake to answer any queries about VB installations.

Packing a file with ASPack

If use ASPack to compress your executable files, you can invoke it from the files list by right-clicking the file and choosing Pack with ASPack from the context menu. The context menu also contains an item to display the file version information. Both these options will be disabled if the file is not an executable file.

Using past scripts when the files have been moved

If you have created a script sometime ago and have since moved the source files to another location, you can quickly change the directory of selected files in the files list by right-clicking the files grid and choosing Change source location from the context menu. You will be asked to located the new directory and the directory information for each of the selected files will be changed automatically.

Changing file properties

In cases where you have already added a file or files to the files grid and you later want to change the options for particular files, rather than changing each file individually by double-clicking it, changing the options and then clicking the Add button, you can use the following procedure. First select the new options, attributes, copying mode and/or Windows versions in the top part of the [Files] page. Then select the files to be changed in the files grid. Finally, right-click the files grid and choose Change properties from the context menu. All the selected files' properties will be changed to those you have just chosen.

Notes regarding the Files Grid

The order of files in the files list is not important, but you can, should you wish, change the order using the two buttons on the right of the files list. You can also sort the files into various orders by choosing Sort from the right-click context menu.

Zoom buttonAs the space available for the Files grid is limited if you are using a small screen size, it may not be possible to see many of the files at one time. By clicking the Zoom button the grid will be expanded to fill the whole page. Click it again to put it back to its normal size.

Up to three user-customised menu items can be added to the context menu which appears when you right-click the Files Grid. These can be set up from the [Options] page.

In a complex installation with many additional directories, it is useful to be able to check that you have asked for the files to be installed in the correct directories. By clicking the View Structure button you will get a "tree" view of the installation similar to the one shown below:

File Outline View

The Files Grid context menu (the one you get when you right-click the grid) is partially user-customisable. You can add up to three custom entries to the context menu - this might be useful, for example, if you use a file packer other than ASPack, which already has its own entry on the menu. To add custom menu items, go to the Options page.

ScriptMaker Grids - General Note

Many of ScriptMaker's pages contain grids similar to the file list on this page. In many cases there will be insufficient room to display the whole of the entry in a particular cell. The columns may be resized by dragging the right border of the column in the headings row, but this is not always a convenient method when you just quickly want to see the contents of a particular cell. In all these grids, if you place the mouse cursor over the required cell, the contents will be shown in full below the grid. Grids resize automatically when an entry is added, and will show the full text within each column. You can force a grid to autosize by double-clicking the grid's header bar.

All grids allow several rows to be selected at a time. To delete a block of entries, select the block and then click the appropriate Delete button.

Member of
International Freeware Authors Association
International Freeware
Authors Association
Site Created with TaFWeb Software's PageBuilder




Back - 'DIRS' PageNext - 'ICONS' Page



Copyright © 2005

Last major revision: 7 March 2001 at 17:41 BST Minor revisions: 4 February 2005 at 14:52 BST
This page URL: http://www.tafwebsoftware.co.uk/smtut5.html