Frequently Asked Questions

See also our Knowledge Base.

General installation issues

32-bit and 64-bit issues

File and folder installation

File registration

Shortcut installation

Font installation and registration

Registry keys and values installation

Service installation

Visual Basic 5/6 projects

.Net installation

Internet Information Server (IIS) installation tasks

Application registration during installation

Installer user interface

Installer build process

Installer distribution

Installer runtime behavior

Installer runtime errors

General installation issues

How do I create an installer for non-Administrator users?

Go to the Installer options page and set Installation level: All Users, query Current User. If the installer is started by a non-Administrator user, this option will automatically redirect your program files and shortcuts (after asking the user); you don't need to change anything else in your InstallMate project. To redirect without asking the user, set Installation level: All Users, else Current User.

For details, see Installation types.

32-bit and 64-bit issues

How do I create a 64-bit installer?

This doesn't require anything special. Our installers run on both 32-bit and 64-bit versions of Windows and will install both 32-bit and 64-bit programs without further ado. (Although 64-bit applications will only run if installed on a 64-bit system, they can be installed on a 32-bit system if you wish.)

If you need to create a pure 64-bit installer, for example to run in a 64-bit Windows Preinstallation Environment (which doesn't have a WoW64 layer), then set Install on: x64 Windows only in the Package.

How do I create both a 32-bit installer and a 64-bit installer from the same project?

If you need a pure 64-bit installer in addition to a 32-bit installer, then you can create both by defining two separate installation packages in the same project.

You can build both installers by choosing Project > Build All Selected or by pressing the Shift+F7 key combination.

Note that the first installer can run on 64-bit as well as 32-bit systems if the 64-bit system has a WoW64 layer; this applies to most 64-bit desktop and servers systems, with the exception of the 64-bit Windows Preinstallation Environment. For details about the 32-bit and 64-bit Setup.exe programs, see Setup stubs.

Which Program Files folder should I use? 32-bit or 64-bit?

That depends on your application, not on the Windows target. If it's a 32-bit application, it must be installed under Program Files (32-bit); if it's a 64-bit application, then it should go under Program Files (64-bit). At installation time, the installer will then use the correct folder on the target system. See Automagical folders for details.

File and folder installation

Where are the Windows Vista and Windows 7 folders?

The Windows Vista and Windows 7 folders all appear on the Files and folders page in your InstallMate project. However, the folders tree that you see there is an idealized representation that covers all Windows versions including Windows 95, 98, Me, NT4, 2000, XP, Vista, 7, and their Server variations. At installation time, the various folder paths automagically adapt to the actual folder layout of the target system.

Example: The All Users\Application Data folder on the Files and folders page resolves to one of the following:

Windows 95/98/Me C:\Windows\All Users\Application Data
Windows NT4 C:\WinNT\Profiles\All Users\Application Data
Windows 2000/XP/2003 C:\Documents and Settings\All Users\Application Data
Windows Vista/7/2008 C:\ProgramData

For details see the Automagical folders and Standard folders topics.

How do I find the special Windows folder paths in my application?

This is not strictly speaking an installation task, but if you need to retrieve the special Windows folder paths in your application (rather than in the installer), use the SHGetSpecialFolderPath() function from the Win32 API.

For example, to retrieve the all users Application Data path for the system that your application runs on, use the function with a CSIDL of CSIDL_COMMON_APPDATA. To get the per-user Application Data folder path, use the CSIDL CSIDL_APPDATA.

Which Program Files folder should I use? 32-bit or 64-bit?

That depends on your application, not on the Windows target. If it's a 32-bit application, it must be installed under Program Files (32-bit); if it's a 64-bit application, then it should go under Program Files (64-bit). At installation time, the installer will then use the correct folder on the target system. See Automagical folders for details.

How do I change the access permissions on a file or folder?

By using our GiveAccess tool. Include that in your installer, then run it in a Run Program action during the MainInstall action sequence. The Run Program action attributes should be similar to this:

Finally, move the action up (Ctrl+Up) until it appears immediately after the predefined InstallFiles action.

How do I make a program run as Administrator?

There are three general methods for this:

  1. Create a Run As shortcut - Create a shortcut to the program if you haven't done so already, then check its Run As Other User box. This method works for Windows 2000, XP, Vista, and later versions of Windows.
  2. Include an application manifest - Place an application manifest inside your program .exe file and set requestedExecutionLevel to requireAdministrator. This method works for Windows Vista and later, not for Windows XP or earlier. See Microsoft's Create and Embed an Application Manifest (UAC).
  3. Embed your program in a preloader - Using the Tarma Preloader utilities, you can embed your program (or documents) in a special preloader and also include the Administrator or another account's login details in encrypted format. The preloader will then start your program and automatically run it using the embedded Administrator or other credentials.

The real question is: why do you need to run your program as Administrator? Is it because it needs to write to files or folders that have "suddenly" become read-only under Windows Vista and later? In that case, please read Recommended installation folders.

How do I set the installation folder programmatically in the installer?

The short answer: don't set it; instead let the user choose. However, if you really must, then create a new Set Variable action in the DoFirstInstall action sequence on the Actions page. Place this action before the predefined SetInstallDir action (use Ctrl+Up to move the new action up after creating it). Set its attributes as follows:

Where should I install files that must be writable to all users?

This always was tricky, but it has become more complicated since Windows Vista. The short answer is: don't use files that must be writable to all users. Instead, split your application data into read-only data that you place in or near the application's installation folder, and writable data that you duplicate for each user in the user's private folders such as My Documents or the per-user Application Data folders.

For a full overview of suitable installation folders, see the topic Recommended installation folders.

If your application absolutely, positively must use data that is writable to all users, and you are prepared to inflict the resulting security violation onto your customers, then install the data files in a subfolder of the All Users Application Data folder and use our GiveAccess tool to change the permissions on your data files to allow access to Everyone (SID S-1-1-0). See How do I change the access permissions on a file or folder? for details.

Note that doing so will make your application ineligible for Windows Logo compliance.

(A better design is to create a separate program that runs as a service and regulates access to the writable data on behalf of all users, like a database server does. However, this requires a considerable amount of extra implementation effort.)

How do I copy (or delete, move) existing files during installation?

Use a Run Script action with the batch commands that copy (delete, move) files. For example:

COPY "<INSTALLDIR>\MyFile.exe" "<INSTALLDIR>\Some\Other\Path" 

Be sure to "quote" any paths that may contain spaces after expansion of symbolic variables.

I added an installation folder, but it's not being created during installation?

The default installation action for folders is Create on demand, i.e., the folder is only created when something is installed in the folder. To create a folder regardless of its contents, set Install action: Create always. See the Folder attributes topic for details.

File registration

How do I register a DLL during installation?

By setting its Registration: Use DllRegisterServer file option. In most cases, the InstallMate Builder environment will already have set this option for you. And yes, this works for both 32-bit and 64-bit DLLs. (64-bit DLLs can only be registered successfully on a 64-bit Windows system, obviously.)

Note: You do not need regsvr32.exe if you use this option. In fact, we strongly recommend that you use this option instead of regsvr32.exe because it gives the installer more control over DLL registration and unregistration on all Windows platforms.

How do I register a COM interop DLL/type library?

By adding the corresponding .tlb type library file alongside the DLL, then setting Registration: Use RegisterTypeLib in the type library's file settings. Normally, Visual Studio will create this .tlb file for you when you build the DLL. If it doesn't, then you can create the type library from the information in the assembly DLL by using the Type Library Exporter tool from Microsoft.

Note: An assembly-type DLL such as produced for .Net programs normally does not contain a DllRegisterServer() entry point, so registering the DLL directly doesn't work. You must use a separate type library.

Shortcut installation

How do I install a shortcut to my application?

By creating a shortcut on the Files and folders page, in one of the All Users or Current User subfolders. See Installing Shortcuts for details.

How do I create a shortcut to the uninstaller?

By creating a shortcut to <TinProductFolder>\Setup.exe with the /remove option on the Files and folders page, in one of the All Users or Current User subfolders. See Installing Shortcuts for details.

How do I create an Add/Repair/Remove shortcut for my application?

By creating a shortcut to <TinProductFolder>\Setup.exe on the Files and folders page, in one of the All Users or Current User subfolders. See Installing Shortcuts for details.

Font installation and registration

How do I install and register a font?

Just add the font file (.ttf, .ttc, .otf, or .fon) to the Target System\Windows\Fonts folder in your InstallMate project. InstallMate will detect the font type and automatically set the correct font registration option. See also Installing and Registering Fonts.

Registry keys and values installation

How do I create a new registry key during installation?

Create the desired registry key on the Registry page in your InstallMate project, if necessary by first creating its parent key(s). You can set various installation options.

How do I create a new registry value during installation?

Create the desired registry value on the Registry page in your InstallMate project, if necessary by first creating its parent key(s). You can set various installation options.

How do retrieve a registry value during installation?

By using a symbolic expression with the <@<HKLM>\Path\To\Registry\Value> syntax. For example:

<@<HKLM>\Software\Microsoft\DirectX\Version> 

To retrieve the unnamed (default) value, leave the final name empty, but keep the trailing backslash:

<@<HKLM>\Software\Microsoft\DirectX\> 

To retrieve a value from other hives, substitute <HKCU> (Current User) or <HKCR> (Classes Root) for <HKLM> (Local Machine).

How do I test for the existence of a registry key during installation?

By using a symbolic expression with the $rkaccess() runtime function and the (symbolic) registry key path. For example:

<$rkaccess(<HKLM>\SOFTWARE\Microsoft\Windows\CurrentVersion\ThemeManager)>

Service installation

My service is installed correctly, but the Start Service action fails. Why?

The most likely cause is that your service startup times out, which means that it doesn't update its "start pending" status often enough with the Windows Service Control Manager. As a result, the SCM times out and returns an error message to the installer, even though your service may be continuing its startup process in the background.

To resolve this, make sure that your ServiceMain() function calls SetServiceStatus() regularly to update the wait hint or the check point value.

Visual Basic 5/6 projects

Does the installer support installation of Visual Basic 6 programs?

Yes, no problem. Do one of the following:

  1. Choose File > Open Project... from the main menu, then browse and select your .vbp Visual Basic 5 or 6 project.
    --or--
  2. Create a new InstallMate project in the usual way (File > New Project...), then choose File > Import > Visual Basic Project... from the main menu and browse and select your Visual Basic 5 or 6 project.

Regardless of the method that you use, InstallMate will then do the following:

  1. Parse your .vbp project file and extract the project name, its main program (.exe) file, and all declared dependencies on typelibs, OLE components, and ActiveX controls.
  2. Based on the extracted information, add your main program file to the main installation folder, and all declared dependencies to the Windows 32-bit System folder, and set the correct registration options for each.
  3. Add the Visual Basic 6 runtime file MSVBVM60.DLL to the 32-bit System folder.

Does the installer detect, install and register all required DLLs and OCXs for my VB6 program?

Yes, as long as they are properly declared in the .vbp project file. See the answer to the previous question.

How do I install and register ActiveX controls (OCX files) for my VB6 program?

If you need to install and register additional ActiveX controls or other COM components, then simply add them to the Target System\Windows\System (32-bit) folder in your InstallMate project. InstallMate will automatically detect the file types and set the correct registration options.

How do I install the Visual Basic SP6 support files?

By downloading and installing our Visual Basic 6 add-on, then using the File > Import > Project Items... command on the InstallMate main menu to import the VB6 Runtime support.imq project item.

.Net installation

How do I install the .Net runtime on a system?

By using a suitable prerequisite on the Prerequisites page. We have predefined prerequisites for all current .Net releases; each prerequisite will check for the presence of its .Net version on the target system, and automatically download and install the correct .Net redistributable if the required version is not present. This also takes into account x86 (32-bit) versus x64 (64-bit) versions of the .Net runtime.

How do I register a public assembly in the GAC?

By adding the assembly file (typically a DLL) to the GAC folder in your InstallMate project:

Target System
   Windows
      assembly

Drop your assembly DLL into the assembly folder. InstallMate will automatically generate the appropriate assembly component and take care of the required registration (during installation) and unregistration (during uninstallation).

Note: This procedure assumes that your assembly DLL really is suitable as a public assembly, i.e., that it is digitally signed and has a strong assembly name and appropriate assembly manifest. If that is not the case, then InstallMate will generate one or more of the following diagnostic messages when you build your installer: BLD:W0133, BLD:W0135, BLD:W0136, and possibly others. Do not ignore these warnings, because they indicate issues that will cause the installation or your application to fail.

Internet Information Server (IIS) installation tasks

How do I create new web folders during installation?

On the Files and folders page in your InstallMate project, create the desired folders under the predefined Inetpub\wwwroot folder. This folder represents the root folder of the first IIS web site.

How do I create virtual folders during installation?

In the MainInstall action sequence, add a Run Script action that invokes the iisvdir tool that comes with IIS. See How to manage Web sites and Web virtual directories by using command-line scripts in IIS 6.0 on the Microsoft web site.

How do I create new web sites during installation?

In the MainInstall action sequence, add a Run Script action that invokes the iisweb tool that comes with IIS. See How to manage Web sites and Web virtual directories by using command-line scripts in IIS 6.0 on the Microsoft web site.

Application registration during installation

Note: We are referring to things like license registration or activation for your application, not to DLL registration.

How do I allow the user to enter registration information during installation?

By enabling this on the User interface page in your InstallMate project. This in turn displays the Registration information dialog box in the installer with fields for the user's name, company, and registration code.

How do I check the user's registration information during installation?

By using an extension DLL and implementing handlers for the InitRegistration, CheckRegistration, and ApplyRegistration messages. Note that there are 3 distinct phases (initialization, checks on the user's input, and finally storing the registration info).

The C:\Program Files [(x86)]\ InstallMate 9\Tix folder on your system contains the source code for a complete extension DLL. You only need to edit the following functions in the TixHandlers.cpp file:

_TixOnInitRegistration()
_TixOnCheckRegistration()
_TixOnApplyRegistration()

In your implementation, you can use the iTixRuntime callback interface. Also check out the files TixUtils.h and TixUtils.cpp; these contains lots of helper functions that may be useful and only use the Win32 API.

After you have built your extension DLL (in 3 versions: ANSI/32, Unicode/32, and Unicode/x64; all predefined in the Visual Studio projects), you must add it to the installer on the Installer options page, Advanced... options.

Installer user interface

How do I make one dialog control appear in front of another?

If you have two or more overlapping dialog controls, then you can change their Z-order (the order in which they are painted) by selecting a control in the dialog/control tree in the left pane on the Dialogs project page, then using Ctrl+Up and Ctrl+Down to move the control up or down in the order. These keystrokes are shortcuts for the Move Up and Move Down commands on the control's context menu.

How do I add list items to a ComboBox or ListBox control at runtime?

Use Set Window State actions with State action: Insert item. Note that each such action will add a ListValue item with both the Value and the Display text set to the text that you specify in the Set Window State action. There is currently no way to add separate Value and Display text strings at runtime.

Installer build process

How do I build an installer from the command line?

Use the InstallMate Builder command line syntax to build either a specific installation package, or all packages in one invocation.

How do I suppress one or more diagnostic messages during the build process?

By changing the preferences for diagnostic messages in one or both of these places:

Important: The build diagnostics are generated to help you identify potential problems before you deploy your installer. If you suppress build diagnostics, and in particular if you suppress Warning or Error messages, you run the risk of missing issues that might cause your installation to fail or produce an application that won't function properly.

Installer distribution

How do I create an installer that downloads the bulk of the files instead of a single .exe package?

Just select Packaging: Loader + Download in the Package attributes pane. This creates a small .exe loader that you should distribute, plus one or more .tiz archives that you should place on your web server. Read the Installer packaging topic for details and variations.

Installer runtime behavior

Why does Windows Explorer open at the end of the installation?

Probably because the UIRunApp variable has a nonzero value, but you have not specified a program to run from the Finish page. The final action in the UIFirstInstall action sequence is a Run Program action that is controlled by the UIRunApp variable, which defaults to 0. If you do not specify an application to start from the Finish page but somehow have changed the UIRunApp variable to any nonzero value, the Run Program action will execute with just a folder path. That starts Windows Explorer. To prevent this, set the UIRunApp variable to zero (on the Variables page).

What is this _TinDel.exe program doing in the Temp folder?

_TinDel.exe is a small helper program that the installer (that is, Setup.exe) uses to delete itself and its parent folder at the end of the uninstallation. This is necessary because Setup.exe cannot delete itself while it is running, nor can it delete its parent folder while it still contains Setup.exe.

At the end of the uninstallation process, Setup.exe therefore copies a small program called _TinDel.exe to the %TEMP% folder and passes it the paths to itself (Setup.exe) and Setup.exe's parent folder. _TinDel.exe waits until Setup.exe terminates and then deletes it, followed by its parent folder. This leaves _TinDel.exe behind, but in a place that is meant for short-lived files (%TEMP%). To make sure that _TinDel.exe itself is eventually removed, it is registered for a post-boot removal by Windows, so it will disappear at the next system restart.

Why is the previous version of my product uninstalled when a new version is installed?

For robustness and to ensure that future uninstalls will cleanly remove everything they should remove. When you install a new version of a product, it typically contains newer versions of existing files, but it may also add new files and omit files that were included with previous versions. It is even possible that the folder layout has changed.

For those reasons it's not safe to assume that installing a new version "on top" of an existing version will result in a clean installation: there might be obsolete files left over, files or folders in the wrong place, etc. Moreover, even if the new installation were successful, then the new installer's uninstaller doesn't know how to clean up old files that were not part of the new installation; only the previous version's uninstaller knew that. And finally, if your product contains shared files with a reference count, then those reference counts would not be properly decremented and incremented during an "on top" installation, thus leaving those shared files efectively for ever on the target system.

That is why all our installers run the previous version's uninstaller just before they install the new files, folders, and other installation items: it is the closest we can get to a "clean" installation in the presence of a previous version.

How do I suppress the "This application must be uninstalled..." message box?

By clearing the Query uninstall box of the Uninstall Product action that causes it. You can do so as follows:

  1. Go to the Actions page in your InstallMate project and select the MainInstall action sequence.
  2. Find and select the UninstallPrevious action near the top of the sequence.
  3. Clear its Query uninstall box.

How do I prevent my password from showing up in the installer log file?

Assuming that you store the password in a symbolic variable, then you can suppress logging of that variable's value by setting the Do not log in installer option. Setting that option prevents the TSU:D0001 and TSU:D0006 diagnostic messages from printing the variable's value. However, if you use the variable in its symbolic form <MyVarName> elsewhere in the project, for example in a MessageBox or Run Program action, then it might appear in the installer log file in the context of those actions.

How do I schedule a reboot at the end of the installation?

There are two methods for this.

  1. [Recommended] On the Installer options page in your InstallMate project, select Reboot policy: Reboot if required (this is the default). Then add a Set Variable action to the MainInstall action sequence that sets the TsuRebootRequired variable to 1 (one) or any other nonzero number. You can use the Condition field of the Set Variable action to schedule the reboot only under specific circumstances.
  2. Alternatively, on the Installer options page in your InstallMate project, select Reboot policy: Always reboot. This is not recommended, but it will reboot the system at the end of each installer and uninstaller session.

Installer runtime errors

How do I find out what the installer did (or did not) do during installation?

Find the installation log file on the target system, then run the LogX.exe program to decode the diagnostic message codes in it.

The LogX.exe program is installed in the InstallMate program folder, which is typically C:\Program Files\InstallMate 9\Bin (on a 32-bit system) or C:\Program Files (x86)\InstallMate 9\Bin (on a 64-bit system). On non-English systems the Program Files part may be in the local language.

The LogX.exe program is a console mode program that you must run from a command prompt like this:

C:\> "C:\Program Files\InstallMate 9\Bin\logx.exe" MyProduct-20110824T195502-Install.log

Replace MyProduct-20110824T195502-Install.log with the actual log file name. The decoded log file replaces the original file.

Where do I find the installation (or uninstallation) log file?

The installation log files are created in the %TEMP% folder of the installing user. Their names follow the pattern PackageName-YYYYMMDDThhmmss-Action.log, which should be easy to spot.

For more details, including the location of the log file on Windows versions before Windows Vista, see the topic Setup log file.

What does the "Invalid database" error mean?

This error message is only produced by Tarma QuickInstall 2.x, not by any of the later installers. It is equivalent to exit code 3. The most common causes of this error with QuickInstall are:

  1. Damaged download file; try downloading again (after clearing the browser cache!)
  2. Interference of an anti-virus tool; try switching that off temporarily.
  3. Insufficient access rights; run as Administrator and do not check "Run this program with restricted access" box.

Why does the installer fail when it tries to register my DLL (or ActiveX control)?

There can be many reasons for this, but the first thing you should know is that file registration errors do not have to terminate the installation process. If you want the installer to continue with the rest of the installation even if one or more DLLs fail to register, then do the following:

  1. Go to the Installer options page and click on the Advanced... button to open the Advanced Installer Options dialog box.
  2. On the Error Handling tab, clear the box marked File registration errors so these errors are no longer treated as fatal.
  3. Click OK to close the Advanced Installer Options dialog box.

Here are some common reasons why DLL registration fails; to find out which one applies in your case, you must inspect the installation log file.

Missing dependencies
One of the most common causes is that you did install the DLL file, but forgot to include one or more other DLLs on which your main DLL depends. You can find out which other DLLs are required by using the free Dependency Walker tool. Missing dependencies are usually indicated by error #126 (ERROR_MOD_NOT_FOUND: The specified module could not be found) in the installation log file.
Wrong version of the DLL

Another increasingly common cause is using the wrong version of the DLL, such as a 64-bit DLL on a 32-bit system (the reverse usually works, but may not be what you intended). It may also take the form of an older DLL version than expected, or even a newer than expected version.

Incorrect bitness of a DLL is typically indicated with error #11 (ERROR_BAD_FORMAT: An attempt was made to load a program with an incorrect format) in the installation log file; version mismatches may lead to any number of error codes, including #127 (ERROR_PROC_NOT_FOUND: The specified procedure could not be found) and #998 (ERROR_NOACCESS: Invalid access to memory location). The latter may also indicate that the DLL tried to execute code from a read/write data segment, which is disallowed if Data Execution Protection (DEP) is active on the target system.

Why does the installer not see my mapped network drives?

Probably because the network drive was mapped for the user only, and the installer is running elevated as Administrator.

Windows network drive mappings can be done on a per-user basis (any user can do that) or system-wide (which requires Administrator rights). If the mapping was done on a per-user basis and the user then starts the installer with elevation to Administrator, the earlier user-specific drive mappings will not be visible to the installer.

To work around this, either create the network drive mappings system-wide or use UNC paths of the form \\server\share\rest\of\path.