1602: The user cancelled the installation
The installer was cancelled. In SCCM a user closed a visible setup window, or the installer cancelled itself on a check.
What 1602 means
Exit code 1602 means "User cancelled installation". Windows Installer ended because something told it to stop. That can be a person who clicked Cancel. It can also be the installer's own logic.
You see it in Software Center on a failed install and in the console under Monitoring > Deployments. On the client, AppEnforce.log shows the command line and the exit code. For packages, look in execmgr.log.
Common causes
- The install is not silent, so the user saw the setup window and closed it.
- The deployment type lets users view and interact with the install.
- The installer or a wrapper script found the application open and cancelled.
- A custom action in the MSI returned "user exit" after a failed check.
- A wrapper script returns 1602 when the user puts off the install.
How to fix 1602
-
Check that the command is silent
Open
AppEnforce.logand read the command line. An MSI needs/qnto run with no window. A setup program needs the vendor's silent switch. Without it, the installer shows a window and waits for the user. -
Check the visibility settings
Open the deployment type and go to the User Experience tab. Set "Installation program visibility" to Hidden. Clear "Allow users to view and interact with the program installation" unless the install really needs the user.
-
Read the verbose MSI log
If the install is silent and still returns 1602, add
/l*v C:\Windows\Temp\app-install.logto the command and run it again. Search the log forReturn value 2. That value marks a user exit. The lines above it name the action that asked to cancel. -
Close the application first
If the installer cancels because the application is open, close it before the install. Add the executable names on the Install Behavior tab of the deployment type, or stop the processes at the start of your script.
-
Check your wrapper script
If a script starts the installer, read the script's own log. See if it returns 1602 on purpose, for example when a user defers. If that is by design, the client tries again at the next evaluation of a required deployment.
Commands that help
Select-String -Path C:\Windows\Temp\app-install.log -Pattern 'Return value 2' -Context 10, 0
Turn any hex or decimal error code into its meaning, or search every code on this site.