About some Setup Software¶
The Problem¶
When creating a Self-Installing Package, you must specify the loader for your installation program. This loader is typically a small program that initializes the installation process. However, the package automatically removes temporary files after the loader program finishes, which can cause issues if the Setup program has not fully completed the software installation.
First Solution: For InstallShield® Users Only¶
This issue is common with setups created by InstallShield®. InstallShield uses a small loader program to initialize temporary files and DLLs required for the installation routine. Unfortunately, this loader program closes after launching the installation, leading to the removal of essential files before the installation completes.
To resolve this issue, add the following parameter to the Command Line Options field:
/SMS
This parameter instructs the loader program to wait until the installation routine finishes before exiting.
My Files Are Removed Before the Setup Ends! How to Prevent This?¶
You may encounter the following scenarios:
- Your setup files are removed by the package before the setup ends. This is common with setup bootstrap programs, such as those created by Microsoft® Visual Studio Installer (for MSI setups).
- Your setup program requires a system reboot after completion.
Solution: Delayed File Removal¶
To address these issues, enable the "Remove Setup files only at Windows startup (in case of a reboot)" option in the Setup Execution panel.
When this option is enabled:
- The package extracts its files to a temporary folder.
- The setup procedure is launched.
- Instead of removing the files immediately after the setup loader ends:
- An internal uninstaller is created to manage the cleanup process.
- The uninstaller is placed in the temporary folder alongside the setup files.
- Windows is configured to run this uninstaller at the next startup.
- During the next startup, the uninstaller silently removes the temporary setup files and folder.
Key Benefits¶
- Ensures that temporary setup files are not removed prematurely.
- Cleans up the temporary folder after a reboot without affecting your installed application files.
This option is particularly useful for setups requiring a system reboot or for bootstrap programs that rely on temporary files during the installation process.