Tech News
← Back to articles

Windows 3.1 in a Windows 95 Virtual Machine (2022)

read original related products more articles

Windows 3.1 in a Windows 95 Virtual Machine

Windows 95 can run the GUI portion of Windows 3.1 as a DOS program in a virtual machine. So too can Windows 3.1. The story has more to it than you would ever know from Microsoft. What’s here now is only the first of two parts or the first half of a longer article.

Occasional thoughts in late 2021 about my earliest work with DOS and Windows have sometimes got me looking on the Internet. A page by Raymond Chen from 2018 titled For a brief period, Windows 95 could run Windows 3.1 in a virtual machine caught my attention for revealing a pre-release feature that I would otherwise never have known about. Then it held my attention because Raymond stopped short of telling what survived in the released product and didn’t even hint that the feature had all along been much more a natural expectation than modern readers might think.

Or so it seemed to me from memory. Somewhere, I kept thinking, I have a picture. I recalled with certainty that discussions with Andrew Schulman in 1995—early enough that Windows 95 had not yet been released—had led me to a quick demonstration that an MS-DOS Prompt in Windows 3.1 could run a copy of the Windows 3.1 GUI. I also remembered what small trickery was required, not exactly but well enough to be confident of refreshing the details from notes that I knew I must still have. Also a strong memory was that the same trickery was mysteriously not needed for Windows 95. Less well remembered was a sense that Windows 95 presented other complications, but this may have been for some quixotic notion of running some of the Windows 95 GUI in an MS-DOS Prompt under Windows 95—or, less unrealistically, of exiting and re-running the Windows 95 GUI without leaving the Windows 95 operating system. Such were the architectural probings that I thought about back then! For the simpler matter of having Windows 95 run the Windows 3.1 GUI in an MS-DOS Prompt, I was sure I had got past the thought experiments and got something up and running, and been pleased enough with myself to have kept a screen-shot. That “Windows 95 could run Windows 3.1 in a virtual machine” was certainly not just “For a brief period”, and somewhere I must have this screen-shot to make the point.

Add that Raymond wrote in terms that suggested some revision of history, and I couldn’t help but be intrigued. Raymond, naturally, tends to write from Microsoft’s perspective about Microsoft’s experience and intentions, including for how Microsoft would like its products to be perceived. As Microsoft would have it, MS-DOS persisted in Windows 95 only as some sort of compatibility layer, but Raymond’s phrase “emulated MS-DOS virtual machine” stood out as going too far: when and how did the 80386’s hardware support for virtual-8086 execution get reduced to an emulation? Raymond anyway left unsaid that what was being run in the Windows 95 virtual machine could not be the whole of Windows 3.1, started from scratch by running WIN.COM, but was just its GUI, started by running KRNL386.EXE as a DOS program. This brought back to mind that Microsoft had stretched the definition of Windows 95 to take in not just its GUI and the Virtual Machine Manager (VMM) as its operating system but also the DOS that Windows 95 started from and could exit to—yet now for Windows 3.1 in Raymond’s telling, Windows was conveniently narrowed to just its GUI. Terminology for the relationship between DOS and Windows, and where exactly between them was the operating system, always was too vague for my taste and now it looked more fluid than ever: for Raymond in 2018 it’s just a matter of fact that Windows 3.1 is “the operating system” that Windows 95 “was designed to replace” but my memory of the early 1990s is that Microsoft talked then of Windows 3.1 more as a GUI program and an operating environment than as any sort of operating system.

Of course, memory after nearly thirty years is not nearly as reliable as might be hoped. This is true not just of biological memory but of what I have kept with me on disk or paper—not just after many changes of computers and of software but also because moving from one side of the world to the other and back has the inevitable consequence that things have got lost. I’ve been aware for many years that although I still have some records from the early 1990s, I’m missing much—including the original text of DOS Internals (ISBN 0-201-60835-9)—and that I have hardly anything from the mid-1990s, not even email. Where they’ve got to, I just don’t know—except that I can’t find them here with me now in New York—but Raymond had me intrigued enough that whenever these last few months of diversions into retro-computing have got me rummaging through what archives I have, I’ve kept half an eye open for anything relevant to this execution of the Windows 3.1 GUI in an MS-DOS Prompt in Windows 95.

The Old Screen Capture

Eventually, the neglected screen-shot did turn up. It’s no small frustration that I have no record of how exactly I ever produced this picture (other than pressing Print Screen), but frustration turns out to be an excellent motivator, even more than is curiosity, and so I should not be surprised if I do eventually get Windows 95 installed on some old computer to get a fresh and more instructive picture. I start to think that the reason I have no notes is because there wasn’t any difficulty worth noting, that the hardest part to getting a new picture will be the acquisition of suitable hardware or a willingness to install some third-party emulator from who knows where on the Internet. Meanwhile, the old picture more than suffices, because against the background of Raymond’s story about a science-project feature that was removed before release, it’s no small wonder that anything like the following could ever have existed. (Click on it for expansion to its original 800x600.)

See especially that this isn’t some pre-release build of Windows 95. From the several Internet icons—which have no shortcut overlays, by the way, to encourage the perception that the Internet is a system feature—this Windows 95 can’t be from any earlier than mid-1996. It is anyway not a Windows 95 that was set up for curiosity. It’s a working installation of the real Windows 95 for my real-world use. Among other things it has Microsoft Office installed.

Floating over this very ordinary Windows 95 desktop is a windowed MS-DOS Prompt. Its title shows that the DOS program running within is KRNL386. The contents of the window are consistent with KRNL386 starting a separate installation of the Windows 3.1 GUI which got as far as running the Program Manager with at least enough interactivity for bringing up the About dialog. This in turn confirms that what’s running inside the MS-DOS Prompt is Version 3.1 in 386 Enhanced Mode. So far, so good, but evidently the interactivity had limits. Showing over the MS-DOS Prompt is a message box from Windows 95 to explain that what’s in the MS-DOS Prompt is a “graphics application” that can only be run full-screen. Calling up the About dialog must have been done while the MS-DOS Prompt had the screen to itself. While it was instead in a window for the screen-shot, it had to be suspended.

... continue reading