A Microsoft veteran reveals the clever engineering behind Windows 95's Shift restart shortcut, explaining how it bypassed a full reboot by preserving the CPU's real-mode state and managing conventional memory to quickly reload the protected-mode kernel.
If you used Windows 95 in the 1990s, you likely remember the constant need to restart. Applications hung, drivers failed, and the system often required a full power cycle to regain stability. But there was a hidden trick that could save precious minutes: holding down the Shift key during the restart process. This shortcut, known to many power users, triggered a "fast restart" that skipped the lengthy full boot sequence. Now, Microsoft veteran Raymond Chen has finally explained the technical wizardry behind this decades-old trick.

The mechanism hinged on the EW_RESTARTWINDOWS flag passed to the 16-bit ExitWindows function. When invoked, the shutdown sequence was carefully orchestrated. First, the 16-bit Windows kernel would shut down. Next, the 32-bit virtual memory manager would follow suit. Finally, the CPU would drop from protected mode back into real mode, the legacy x86 state where processors start up, granting direct hardware access. Control was then handed to win.com, a small executable residing in the root directory.
win.com is a classic DOS-style .com file, which is given all available conventional memory upon launch. This memory is a limited resource in the x86 architecture, typically the first megabyte of address space. Upon receiving control, win.com would perform a critical memory management operation: it released all memory beyond its own image back to the system. The goal was to create a single, large, contiguous block of free conventional memory.
This contiguous block was essential for loading the protected-mode Windows kernel. The 32-bit operating system required a clean, unfragmented memory space to initialize its virtual memory manager and other core components. If the memory map was fragmented—meaning free memory was broken into smaller chunks scattered across the address space—the kernel couldn't load properly.
Here's where the trick could fail. If any code, such as a poorly written device driver or a TSR (Terminate-and-Stay-Resident) program, had allocated memory in the region win.com intended to use, the memory would be fragmented. In this scenario, win.com would detect that the expected contiguous block wasn't available. It would then fall back to a full reboot, forcing the user to wait through the entire BIOS POST and OS initialization process.
When successful, however, win.com would quickly launch protected-mode Windows, and the familiar user interface would appear in a fraction of the time of a full reboot. This was a remarkable feat of engineering for its era, leveraging the x86 architecture's mode-switching capabilities and careful memory management to deliver a user-requested feature: faster recovery from system hangs.
This technique highlights a fundamental difference between Windows 95's design and modern Windows. Windows 95 was built on top of MS-DOS, inheriting its 16-bit legacy and memory constraints. The fast restart was a clever workaround within that framework. In contrast, modern Windows (XP and later) is built on the Windows NT kernel, which uses a completely different architecture. The NT kernel is a 32/64-bit protected-mode OS from the ground up, with no dependency on real mode or DOS conventions. The Shift restart trick is entirely obsolete in this context, replaced by features like Fast Startup (which hybridizes a shutdown and hibernation) and the modern UEFI firmware's rapid boot capabilities.
Chen's explanation also sheds light on Microsoft's historical approach to compatibility and user demands. The company was known for quietly patching third-party code or implementing workarounds to ensure systems behaved as expected, even if the root cause lay in another vendor's software. The fast restart was a prime example of giving users what they wanted—a faster way to get back to work—through deep system-level engineering rather than just surface-level UI changes.
For those interested in the low-level details of x86 architecture and operating system design, this story is a fascinating look back at an era when developers had to work within severe hardware constraints. The techniques used in win.com are a testament to the ingenuity required to build a responsive user experience on the hardware of the day. To explore the evolution of Windows boot processes further, Microsoft's official documentation on Windows startup provides a detailed look at the modern equivalent.
The Shift restart trick remains a beloved piece of Windows 95 lore, a reminder of a time when a simple key press could save minutes of waiting and demonstrate the intricate dance between software and hardware that defined the PC experience.

Comments
Please log in or register to join the discussion