Inno Setup Frequently Asked Questions |
Last Updated: 2000-07-09
Following are answers to some of the top questions I receive regarding Inno Setup.
Translating Inno Setup's text into another language does not require modifying the source code. Simply make a copy of the Default.isl file (included with Inno Setup) and start editing the text in it. (Do not directly edit the Default.isl file, as doing so may cause Inno Setup binary patches to not install properly.) See the "[Messages] Section" topic in the Inno Setup help file for some important tips.Once you have finished creating the new .isl file, add a MessagesFile directive to your script's [Setup] section, to tell the compiler to use it:
[Setup]
MessagesFile=compiler:MyTranslation.isl
There are many contributed translations available for download on the Inno Setup Third-Party Files page.
This is not currently possible. However, I do intend to add an option for this in one of the next releases. This option would be NT/2000-only, since Windows 95/98 lack the UpdateResource function which automates the process of changing resources in compiled EXEs.
Not currently possible, but Martijn Laan has been working on it in his Inno Setup Extensions.
Not currently possible, but Martijn Laan has been working on it in his Inno Setup Extensions.
This message is typically displayed if you try to embed a quote (") character in a parameter's data, but do not double it as required. Read the "Parameters in Sections" topic in the Inno Setup help file for more information.
First create a file named, for example, "website.url", and place these lines inside it:[InternetShortcut]
URL=http://web.site.address/Then add these lines to your script:
[Files]
Source: "website.url"; DestDir: "{app}"
[Icons]
Name: "{group}\Visit My Web Site"; Filename: "{app}\website.url"
Use a WorkingDir parameter on the [Icons] section entry.
First set the [Setup] section directive "ChangesAssociations" to "yes". Then create [Registry] entries as shown below.[Registry]
Root: HKCR; Subkey: ".myp"; ValueType: string; ValueName: ""; ValueData: "MyProgramFile"; Flags: uninsdeletevalue".myp" is the extension we're associating. "MyProgramFile" is the internal name for the file type as stored in the registry. Make sure you use a unique name for this so you don't inadvertently overwrite another application's registry key.Root: HKCR; Subkey: "MyProgramFile"; ValueType: string; ValueName: ""; ValueData: "My Program File"; Flags: uninsdeletekey
"My Program File" above is the name for the file type as shown in Explorer.Root: HKCR; Subkey: "MyProgramFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\MYPROG.EXE,0"
"DefaultIcon" is the registry key that specifies the filename containing the icon to associate with the file type. ",0" tells Explorer to use the first icon from MYPROG.EXE. (",1" would mean the second icon.)Root: HKCR; Subkey: "MyProgramFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\MYPROG.EXE"" ""%1"""
"shell\open\command" is the registry key that specifies the program to execute when a file of the type is double-clicked in Explorer. The surrounding quotes are in the command line so it handles long filenames correctly.
Inno Setup version 1.3.15 and later includes support for "closeonexit" and "dontcloseonexit" flags in the [Icons] section.
See the How-To article Implementing Custom Functionality.
The recommended way to install OCX files is as follows. (Note: The following is a single line.)Source: "ComCtl32.ocx"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile regserver
With VB 3.0 and earlier it's easy -- just copy the appropriate VBRUN???.DLL file to the user's system directory and you're done. For VB 4.0, I don't know. For VB 5.0 and 6.0, see this How-To article.
You can download the COMCTL32 updates from http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp. Microsoft does not allow separate redistribution of COMCTL32.DLL (and for good reason), so you should never place COMCTL32.DLL in a script's [Files] section.
See the How-To article Installing BDE for details on deploying the 32-bit version of BDE using Inno Setup.
It's likely possible to properly install those with Inno Setup, but I do not have verified information on how.
I currently use and develop on Windows 2000 primarily, so Windows 2000 compatibility is foremost.
When new major features are introduced, I usually test them personally on Windows 95, 98, NT 3.51, NT 4.0, and 2000.
The 16-bit version of Inno Setup has been discontinued starting with version 1.3. The older 1.2.x version is still available for download, though, if you really need a 16-bit installer.
Inno Setup has been fully Y2K compliant ever since version 1.09 at least. Prior versions of Inno Setup most likely were Y2K compliant too, but I have not gone back and tested them.
The only time the installer looks at dates is when it compares time stamps on files it copies. And the only time this is done is when processing [Files] section entries that use the comparetimestamp flag. The 16-bit version of Inno Setup 1.11i and later can properly handle files with years up to 2107, the maximum for the 16-bit Windows API (versions prior to 1.11i supported years up to 2043). The 32-bit version of Inno Setup has had no limit on the year since version 1.09.
An Inno Setup installation running on Windows NT or 2000 does not require administrative privileges, except when:What is different when an installation is run by a user without administrative privileges?
- "AdminPrivilegesRequired=yes" is set in the script's [Setup] section, which will cause Setup to abort with an error message if the user lacks administrative privileges. (The default setting for the AdminPrivilegesRequired directive is "no".)
- The "restartreplace" flag is used in the [Files] section. This flag causes Inno Setup to call the MoveFileEx function, which attempts to write to "HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Session Manager". Write access to this key is restricted to Administrators on both Windows NT and 2000.
- The "regserver" flag is used in the [Files] section. This flag causes Inno Setup to create/update a value in "HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ SharedDLLs". Write access to this key is restricted to Administrators and Power Users on Windows 2000, but is writable by Everyone on Windows NT.
Inno Setup does not require write access to the WINNT directory, or any other registry keys not mentioned above.
- The registry key for the Add/Remove Programs Control Panel entry is created under HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE. Thus, only the user who installed the program will see an Add/Remove Programs entry for it.
- The "{group}" constant always points to the current user's profile, as opposed to the All Users profile.
- All "{common...}" constants are equivalent to the "{user...}" constants.
- The program may be uninstalled by any user. (When an administrator installs a program, only an administrator is allowed to uninstall it.)
Keep in mind that keys under HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT, and HKEY_USERS\.DEFAULT are all read-only to non-administators on Windows 2000, so if your script uses a [Registry] section or registers a DLL/OCX which writes to those keys, it is recommended that you set "AdminPrivilegesRequired=yes" in your script's [Setup] section to prevent the installation from being run by users without administrative privileges.
It was actually short for "Innovative Setup". (So it's pronounced IN-NO, not EYE-NO.) This was a name I assigned to it when I first started development on it and it stuck. :)