0X00000642

ERROR_INSTALL_USEREXIT (0x00000642) – User canceled installation

Windows Errors Beginner 👁 1 views 📅 May 27, 2026

You see error 0x00000642 when Windows setup stops because it thinks you hit Cancel. Usually a permissions issue or leftover temp files.

1. Corrupted or leftover temporary installer files

This is the most common cause. Windows Installer leaves behind temp files in two places when a previous installation was canceled or crashed. The next time you try to install, the installer sees those leftover files, thinks you canceled mid-stream, and throws error 0x00000642.

Here's how to clear them out:

  1. Press Windows key + R, type %temp%, and hit Enter. A folder full of temp files opens.
  2. Select everything in that folder (Ctrl+A). You'll get a lot of "can't delete" warnings — that's normal. Just click Skip for each one you can't remove. Files that are in use by running programs won't delete.
  3. After that, press Windows key + R again, type temp (no percent signs this time), and hit Enter. That's the system temp folder.
  4. Again, select all (Ctrl+A) and delete what you can. Skip anything that won't delete.
  5. Finally, press Windows key + R, type prefetch, and hit Enter. Delete everything in there. Windows will rebuild these files next time you boot.
  6. Restart your computer.

After restart, try your installation again. This fixes maybe 60% of these errors. If it doesn't, move on to the next fix.

2. Windows Installer service is stuck or corrupted

The Windows Installer service (msiexec) can hang after a failed install. When it's stuck, it thinks a prior installation is still running — and that includes thinking you canceled it.

Real-world trigger: This happens a lot after updating Office or Visual Studio redistributables. Those installers spawn child processes that don't always close cleanly.

To fix it:

  1. Press Windows key + R, type services.msc, and hit Enter.
  2. Scroll down to Windows Installer. Right-click it and select Stop. Don't worry — Windows will restart it when you need it.
  3. Now open Task Manager (Ctrl+Shift+Esc). Click the Details tab. Look for any process named msiexec.exe. If you see one, right-click it and select End task.
  4. Close Task Manager.
  5. Back in the Services window, right-click Windows Installer and select Start.
  6. Restart your computer anyway — it's cheap insurance.

Try your installation now. If you still get the error, let's check permissions.

3. Permissions blocked by antivirus or group policy

Some antivirus software (looking at you, McAfee and Norton) will block installer temp files before they finish. The installer sees this as the user canceling. Also, if you're on a work computer, IT might have set group policies that block installations from unknown sources.

Here's how to test for this:

  1. Temporarily disable your antivirus real-time protection. Don't forget to turn it back on afterward.
  2. Right-click your installer file and select Run as administrator.
  3. If the installation works with antivirus off, add an exception for the installer file or folder.

If you're on a corporate network, you can't change group policy yourself. Contact your IT support and tell them the exact error code 0x00000642. They'll know what to look for in the Application event log (event ID 11728 usually).

One more thing to check: Make sure your user account has full control over the install location. Right-click the folder where you're installing (usually C:\Program Files\ or C:\Program Files (x86)\), select Properties, go to the Security tab, click your username, and make sure Full control is checked. If not, click Edit and check it.

Quick-reference summary

Cause Fix Time to try
Leftover temp files from failed install Delete %temp%, temp, and prefetch folders 5 minutes
Windows Installer service hung Stop service, kill msiexec.exe, restart service 3 minutes
Antivirus or permissions blocking installer Disable AV, run as admin, check folder permissions 10 minutes

Start with the temp file cleanup — that's your best bet. If it still fails after all three, the installer itself might be bad. Download a fresh copy from the vendor's site. I've seen corrupt downloads cause this exact error.

Was this solution helpful?