[Windows Setup] Setup.exe Immediately Crashes and Reboots Windows

When you run Setup from the Windows 10 or 11 ISO, the system may immediately crash and reboot. The user may not realize the reboot was due to a kernel-mode crash.

For instance, running the Windows 11 22H2 setup from the ISO may crash the system and restart the PC immediately. The Installation Assistant or Media Creation Tool may crash/reboot the device after the download phase.

Cause

The root cause for the crash may be your antivirus driver or other third-party drivers running on the computer.

Also, the “Automatically restart” option may have been enabled in the Startup and Recovery settings (in the classic “System Properties’ dialog). Turning off the “Automatically restart” option and enabling the minidump option will generate the .dmp files in the C:\Windows\Minidump folder. The minidump files need to be analyzed using WinDbg.

Resolution

Step 1: Uninstall third-party antivirus programs

Uninstall third-party antivirus, firewall, and anti-malware programs you have installed. In many cases, the antivirus software’s driver may still load even though you’re uninstalled them.

If so, use the specialized uninstaller tool supplied by the AV software vendor to remove all traces of the antivirus program.

For example, if you’re using Avast (or uninstalled it recently), use “AvastClear” to clear all traces of the program. Avast Removal Tool | Download Avast Clear.

avastclear uninstall tool

Likewise, each antivirus vendor has a similar tool to uninstall their product.

Note: It doesn’t have to be Avast in your case. Avast was mentioned as an example. It could be a different antivirus program or even a non-antivirus program that has installed some drivers.


Step 2: Disable the “Automatically restart” option

If cleanly uninstalling your third-party antivirus and firewall programs doesn’t help, enable the minidump option and turn off the “Automatic restart” option in the Startup and Recovery settings.

  1. Open systempropertiesadvanced.exe
  2. Under “Startup and Recovery,” click “Settings.”automatically restart - crash dump - enable minidump
  3. Deselect “Automatically restart.”
  4. Enable “Write an event to the system log.”
  5. Choose “Small memory dump.”
  6. Click OK.

Step 3: Collect the crash dump

Reproduce the problem by rerunning setup.exe. A blue screen error may occur. In the blue screen error, note the details, especially the error code and the file name.



This time the crash data will be written into a .dmp file under the C:\Windows\Minidump folder. Open the latest .dmp file using a debugger and find the root cause. If you haven’t used a debugger, zip the .dmp file(s) and send it to your friend or a computer support technician for analysis.

minidump folder contents


Additional Information

In a recent case, Windows 11 22H2 Setup (setup.exe from the ISO) immediately crashed and rebooted the computer. The “Automatically restart” option was somehow enabled on the computer. The root cause was found after analyzing the minidump.

Here’s what the dump contained:

PROCESS_NAME: setupprep.exe

STACK_TEXT:
ffffa881`860834a0 fffff802`80dcf31b : ffffa881`86083538 fffff802`a058c500 00000000`00000000 00000000`00000000 : nt!KeCheckStackAndTargetAddress+0x53
ffffa881`860834d0 fffff802`a057b076 : fffff802`a058c500 ffffa881`860844b8 ffffa881`860849e0 ffffa881`86083af0 : nt!_C_specific_handler+0x3b
ffffa881`86083540 fffff802`a058c500 : ffffa881`860844b8 ffffa881`860849e0 ffffa881`86083af0 ffffa881`860835e0 : aswSP+0x4b076
ffffa881`86083548 ffffa881`860844b8 : ffffa881`860849e0 ffffa881`86083af0 ffffa881`860835e0 fffff802`80e0477f : aswSP+0x5c500
ffffa881`86083550 ffffa881`860849e0 : ffffa881`86083af0 ffffa881`860835e0 fffff802`80e0477f fffff802`a05972f4 : 0xffffa881`860844b8
ffffa881`86083558 ffffa881`86083af0 : ffffa881`860835e0 fffff802`80e0477f fffff802`a05972f4 ffffa881`86083ae0 : 0xffffa881`860849e0
ffffa881`86083560 ffffa881`860835e0 : fffff802`80e0477f fffff802`a05972f4 ffffa881`86083ae0 fffff802`a057b00c : 0xffffa881`86083af0
ffffa881`86083568 fffff802`80e0477f : fffff802`a05972f4 ffffa881`86083ae0 fffff802`a057b00c fffff802`a0536355 : 0xffffa881`860835e0
ffffa881`86083570 fffff802`80cdfb47 : ffffa881`86083ae0 00000000`00000000 ffffa881`860849e0 fffff802`a0536355 : nt!RtlpExecuteHandlerForException+0xf
ffffa881`860835a0 00000000`00000000 : 00000000`000000c0 00000000`00000001 ffffa881`86084890 00000000`00000000 : nt!RtlDispatchException+0x297

SYMBOL_NAME: aswSP+4b076
MODULE_NAME: aswSP
IMAGE_NAME: aswSP.sys
STACK_COMMAND: .cxr 0xffffa88186082aa0 ; kb
BUCKET_ID_FUNC_OFFSET: 4b076
FAILURE_BUCKET_ID: 0x3B_80000003_aswSP!unknown_function
OS_VERSION: 10.0.19041.1
BUILDLAB_STR: vb_release
OSPLATFORM_TYPE: x64
OSNAME: Windows 10
FAILURE_ID_HASH: {dc5caa34-782b-6a80-8d56-54580a36ce78}
Followup: MachineOwner
Loaded symbol image file: aswSP.sys
Image path: \SystemRoot\system32\drivers\aswSP.sys
Image name: aswSP.sys

The file aswSP.sys is the Avast driver that caused the crash/reboot. Avast software was a registered AV provider on the subject computer, although the user had uninstalled the program long back.

The problem was solved after running AvastClear to clear all traces of the program.

Avast Removal Tool | Download Avast Clear.
https://www.avast.com/en-in/uninstall-utility#pc

After a reboot, Windows 11 could be successfully installed.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Comment