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

ScriptMaker Tutorial

The [Registry] Page



This serves a similar purpose to the [INI] Page, but for entries to the Windows Registry.

The Registry page

From the Root Key combo list choose the main root for the Registry entry. 16-bit installations can only use HKEY_CLASSES_ROOT, but in a 32-bit installation you can select one of the following:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_CURRENT_CONFIG

The Subkey Name field contains the subkey for the entry and can include Directory Constants. In many cases the Subkey Name will begin with Software\, for example Software\My Company\MyApp.

In the Value Name field enter the name for the current value. If this field is left blank then the data is assigned to the Default value. In 16-bit installations this field must always be blank.

The Value Type field allows you to select the type of data for the entry. The allowed types are:

TypeDefinitionExample
NONE No data is entered
STRING A string of any characters SB16 Wave Out [220]
EXPANDSZ    A zero-delimited string of characters    cpgSwapfile
DWORD A double word (integer) value $FC or 252
BINARY A binary value 00 00 56 6F
MULTISZ Multi-string value http://www.tafwebsoftware.co.uk

Only NONE and STRING can be used in 16-bit installations.

The Data field contains the actual data for the entry. STRING and EXPANDSZ types will be entered literally (i.e. exactly as they are typed), so do not include inverted commas unless they form a part of the text you want to enter in the Registry. DWORD values may be entered as decimal numbers or as hexadecimal values (in which case they should start with a $ sign). In the case of DWORD entries you can use option buttons to toggle between decimal and hexadecimal values (these buttons are hidden for any other type). BINARY data should be entered as a series of hexadecimal pairs separated by spaces, for example 00 00 00 00 56 6F 6C 75 6D 65 . You should note that versions of Inno Setup earlier than 1.11g did not handle binary entries correctly.

Install Options

Only one install option is available. Choosing Don't create if value exists allows Setup to make the entry only is a value of the same name does not already exist. Otherwise Setup will overwrite any existing value of the same name.

If the data type is STRING or EXPANDSZ, the Preserve String Type option becomes available. If this option is checked then, if the value does not already exist or the existing value isn't a string type (i.e it is REG_SZ or REG_EXPAND_SZ), it will be created with the type specified by Data Type. If the value did exist and is a string type, it will be replaced with the same value type as the pre-existing value.

Uninstall Options

A number of uninstall options are available.

Choosing Don't delete will prevent the uninstaller from deleting the entry. The Delete Value option has the opposite effect and ensures that the key is always deleted. This can be combined with the Delete if empty option, in which case the key will only be deleted if it is empty.

The Delete subkey option causes the uninstaller to delete the key together with all its values and any subkeys. Use the Clear value option if you want the uninstaller to clear only the value's data while leaving the key and value name.

Use the Add and Delete buttons in the normal way to add or delete entries in the grid. As usual you can double-click an entry in the grid to edit it.

Associating Files with Your Application

If your application produces data files and you want to "associate" them with your executable (that is, you want the user to be able to double-click the data file and open it up in your program), ScriptMaker can automatically include the correct registry settings. To do this, click the Associate File button.

In the "File Association" dialog box fill in the fields as shown below and click OK. Note that the document icon should ideally be included in your executable file, and that you should complete the [Files] page before creating a file association.

Associating a File

Creating a file association in this way automatically sets the Changes Associations option on the [Setup] page so that the correct file icon will be shown immediately after installation.

Importing and Exporting

As well as entering data manually you can import a whole section of the Registry straight into ScriptMaker. If the Registry entries you want to include are already in your own computer's Registry, you can use a program such as RegEdit to export that section to a text file (the file will have a .reg extension). This file can then be dragged onto ScriptMaker's [Registry] page, or you can click the Import/Export button and choose Import from the menu. ScriptMaker can handle files created with the Window 95/98 Registry Editor (REGEDIT4) and the Windows 2000 Registry Editor.

Similarly, the entries you have made on ScriptMaker's [Registry] page can be exported to a .reg file by clicking the Import/Export button and choosing Export and the registry type (Windows 95/98 or Windows 2000) from the menu.

Please note that ScriptMaker cannot at present handle Windows 2000 Registry files which contain accented or foreign characters.

Viewing the Structure

If your installation includes a lot of entries in the Registry you may find it useful to obtain an "overview" of your entries. Clicking the View Structure button will give you a "tree" view something like the one below.

Registry Structure View

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




Back - 'INI' PageNext - 'Run' Page



Copyright © 2005

Last major revision: 5 May 2000 at 14:44 BST Minor revisions: 4 February 2005 at 14:52 BST
This page URL: http://www.tafwebsoftware.co.uk/smtut8.html