Sleep function

Puts the installer to sleep for a number of milliseconds. This suspends the installer process for the specified time, for example to allow external processes to finish their work (although in general, it is much better to use the Time out option of the Run Program or Run Script action for that). The installer's user interface will be unresponsive during the sleep period, so you should keep this period as short as possible under the circumstances.

The Sleep function is a predefined extension DLL function that is distributed with InstallMate. You can use this function by adding a Run DLL action to the action sequence in which you want to run the action. Set the Run DLL action attributes as follows:

Arguments

The Sleep function expects the following argument. All arguments may contain symbolic references; these will be resolved before the function is called. Note that you must "quote" an argument if it contains spaces, or if it could contain spaces after expansion of symbolic references.

sleeptime
The duration of the sleep period, in milliseconds (1000 ms = 1 second).

Return value

Returns ERROR_SUCCESS (zero) if successful, else a nonzero error code. This error code is available in the LastExitCode variable.

Remarks

To use this function, you must add the extension DLL to your InstallMate project. The easiest way to do so is as follows:

  1. Open your InstallMate project.
  2. Choose File > Import > Project Items... from the main menu bar.
  3. Browse for and select the file Insert Extension DLL.imq, then click Open.

Alternatively, you can go to the Installer options page in your InstallMate project, click on the Advanced... button, then click on the Extension DLL tab and enter the paths to the extension DLL versions there.