Installer and setup exit codes

The setup program reports its result as an exit code. Codes matter when nobody is watching the screen — silent installations, software deployment tools, scripted rollouts.

When you run the setup by hand, a problem shows up as a message box and the exit code is of no interest. It becomes the only thing you have when the installation runs unattended: a silent install from a script, a package deployed by Microsoft Intune, SCCM/Configuration Manager, PDQ Deploy or a similar tool, or a step in a workstation image. In those cases the exit code is what the tool records as success or failure.

One rule before the table: only 0 means success. Any non-zero code means the setup did not run to completion, and future versions of the underlying installer framework — the setup is built with Inno Setup — may add codes that are not listed here, so a deployment script should handle unexpected values gracefully rather than assuming this list is exhaustive.

Running the setup silently

The installer download is a ZIP containing the signed setup program. Unpack it first, then call the executable with the standard Inno Setup switches, for example:

SQLDataLensSetup_4002_20260904.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /LOG="%TEMP%\sqldl-install.log"
echo %ERRORLEVEL%

/SILENT shows the progress window but asks nothing; /VERYSILENT shows nothing at all. /LOG writes an installation log, which is the first thing to look at when a code below turns up on a machine you cannot sit in front of. The full switch list for the version you have is printed by the setup itself:

SQLDataLensSetup_4002_20260904.exe /?

That call returns exit code 0, which is why code 0 covers both a completed installation and a help request. If you need an installation with no installer at all — no elevation, no Start-menu entries, nothing in the registry — the portable ZIP is the better route: see installation.

The exit codes

Code Meaning What to do
0 Setup ran to completion, or the /HELP or /? command-line parameter was used. Nothing. This is the success case, and the only code a deployment script should treat as "installed".
1 Setup failed to initialise. Check that the file downloaded completely and is not blocked or quarantined, that there is free space on the target volume, and that no earlier instance of the setup is still running. An error message explaining the problem is normally displayed before this code is returned.
2 The user pressed Cancel in the wizard before the installation started, or answered "No" to the opening "This will install…" prompt. Nothing went wrong technically — the installation was declined. In an unattended rollout this usually means the silent switches were missing, so the wizard asked a question nobody was there to answer.
3 A fatal error occurred while preparing to move to the next installation phase — for example between the wizard pages and the installation itself. This should only happen in unusual circumstances, such as running out of memory or Windows resources. Close other applications, reboot and try again; if it repeats on the same machine, send us the message that was displayed.
4 A fatal error occurred during the installation itself. Look for a file that is locked or in use, a target directory you cannot write to, or antivirus software intercepting the write. Note that errors offering Abort, Retry or Ignore are not fatal errors — choosing Abort there returns code 5 instead.
5 The user pressed Cancel during the installation, or chose Abort at an Abort-Retry-Ignore prompt. The installation was interrupted part-way through, so the result may be incomplete. Run the setup again, or uninstall and reinstall, before treating the machine as installed.
6 The setup process was terminated by the debugger (Run | Terminate in the compiler IDE). You will not see this on a deployed machine; it comes from a development environment. Treat it as "no installation happened" and run the setup normally.
7 The "Preparing to Install" stage determined that setup cannot proceed with the installation. Something on the machine blocks the installation — typically files in use by a running copy of the application. Close SQL DATA LENS (and anything holding files in its directory) and run the setup again. An error message explaining the reason is normally displayed.
8 The "Preparing to Install" stage determined that setup cannot proceed, and that the system needs to be restarted to correct the problem. Restart Windows and run the setup again. In a deployment tool, treat this code as "reboot required, then retry" rather than as a failure.

Before returning code 1, 3, 4, 7 or 8, the setup normally displays a message explaining the problem. With /SUPPRESSMSGBOXES that message never appears, so run the same setup interactively on one affected machine when a code is not self-explanatory — the message is usually more specific than the code.

If a code keeps coming back

Send the exit code, the installation log, the Windows version and the setup file name to support@sqldatalens.com. The current release is version 4.02 (build 4002); state which build you are deploying, because that is the first thing we will ask. See support for what else to include, and the licence activation page if the installation succeeded and the problem is the licence key instead.

Last updated: 4 September 2026