{"id":110507,"date":"2024-11-12T07:00:00","date_gmt":"2024-11-12T15:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=110507"},"modified":"2024-11-12T11:38:25","modified_gmt":"2024-11-12T19:38:25","slug":"20241112-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20241112-00\/?p=110507","title":{"rendered":"Why did Windows 95 setup use three operating systems?"},"content":{"rendered":"<p>Twitter users @tthirtle asked why Windows 95 setup goes through three operating systems: MS-DOS, Windows 3.1, and then Windows 95. Why not go from MS-DOS straight to Windows 95?<\/p>\n<blockquote class=\"twitter-tweet\" data-conversation=\"none\">\n<p dir=\"ltr\" lang=\"en\">Here&#8217;s another good question. Why does Windows 95 setup use 3 different UI&#8217;s. DOS,Win3.x,and Win9x?<\/p>\n<p>\u2014 Thomas (@tthirtle) <a href=\"https:\/\/twitter.com\/tthirtle\/status\/1809777917565767993?ref_src=twsrc%5Etfw\">July 7, 2024<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>Windows 95 setup could upgrade from three starting points: MS-DOS, Windows 3.1, or Windows 95. (Yes, you could upgrade Windows 95 to Windows 95. You might do this to repair a corrupted system while preserving data.)<\/p>\n<p>One option is to write three versions of Windows 95 setup: One for setting up from MS-DOS, another for setting up from Windows 3.1, and a third for setting up from Windows 95.<\/p>\n<p>This was not a pleasant option because you basically did the same work three times, but implemented separately, so you have to do three times the coding.<\/p>\n<p>A better option is to just write one version of Windows 95 setup and use it for all three starting points. So now you get to choose the platform on which to base your code.<\/p>\n<table class=\"cp3\" style=\"border-collapse: collapse; text-align: center;\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n<tbody>\n<tr>\n<th rowspan=\"2\">From<\/th>\n<th colspan=\"3\">App type<\/th>\n<\/tr>\n<tr>\n<th>MS-DOS<\/th>\n<th>16-bit GUI<\/th>\n<th>32-bit GUI<\/th>\n<\/tr>\n<tr>\n<td>MS-DOS<\/td>\n<td>\u2022<\/td>\n<td>&nbsp;<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td>Windows 3.1<\/td>\n<td>\u2022<\/td>\n<td>\u2022<\/td>\n<td>&nbsp;<\/td>\n<\/tr>\n<tr>\n<td>Windows 95<\/td>\n<td>\u2022<\/td>\n<td>\u2022<\/td>\n<td>\u2022<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>If you write Windows 95 setup as an MS-DOS app, then it runs on all three platforms. That&#8217;s great! You need to write only one setup program. The downside is that it&#8217;s going to be a text-mode setup program, which looks ugly and gives a poor initial impression of what is supposed to be a brand new GUI world.<\/p>\n<p>At the other extreme, you can write Windows 95 setup as a 32-bit GUI program, but that means that if the user is starting from MS-DOS or Windows 3.1, you have to install Windows 95 before you can run Windows 95 setup, which is a bit of a catch-22.<\/p>\n<p>In the middle is the happy medium: You can have the MS-DOS setup program install a minimal version of Windows 3.1, just barely enough to support what the 16-bit GUI setup program needs.\u00b9 This tiny version is small enough to be copied and installed off a small number of floppy disks. Once that&#8217;s done, boot into the tiny version of Windows 3.1 and run the 16-bit GUI setup program.<\/p>\n<p>Okay, so now we have three setup programs. The first one is used if you&#8217;re installing from MS-DOS: It installs the tiny version of Windows 3.1, and then boots into Windows 3.1 to continue to the next step.<\/p>\n<p>The second setup program runs as a 16-bit Windows app, either in the miniature copy of Windows 3.1 (if the user is upgrading from MS-DOS), the real copy of Windows 3.1 (if the user is upgrading from Windows 3.1), or the real copy of Windows 95 (if the user is upgrading from Windows 95). This second setup program is the one that does almost all of the real work: It does the initial interaction with the user to gather information about how to install Windows 95, like asking which optional components to include, and does hardware detection to decide which drivers to install.\u00b2 And then it copies the drivers and Windows 95 files onto the system, migrates your old settings to the new operating system, and boots into Windows 95.<\/p>\n<p>The third setup program runs as a 32-bit Windows app. It is running in the real Windows 95 system and does some final steps that require operation a live running system, like installing printers.<\/p>\n<table style=\"border-collapse: collapse; text-align: center;\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n<tbody>\n<tr>\n<td align=\"right\">Starting from MS-DOS \u2192<\/td>\n<td style=\"border: solid 1px currentcolor;\">Install mini Windows 3.1<\/td>\n<td style=\"width: 1em;\">\u00a0<\/td>\n<td style=\"border: solid 1px currentcolor; border-left: none;\">\u00a0<\/td>\n<td align=\"left\">MS-DOS app<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td>\u2193<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td style=\"border: solid 1px currentcolor;\">Boot into mini-Windows 3.1<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td>\u2193<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">Starting from Windows 3.1 \u2192<\/td>\n<td style=\"border: solid 1px currentcolor;\">Gather information<\/td>\n<td style=\"width: 1em;\" rowspan=\"7\">\u00a0<\/td>\n<td style=\"border: solid 1px currentcolor; border-left: none;\" rowspan=\"7\">\u00a0<\/td>\n<td rowspan=\"7\" align=\"left\">16-bit Windows app<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">or Windows 95<\/td>\n<td>\u2193<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td style=\"border: solid 1px currentcolor;\">Detect hardware<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td>\u2193<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td style=\"border: solid 1px currentcolor;\">Copy drivers and<br \/>\nWindows 95 files<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td>\u2193<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td style=\"border: solid 1px currentcolor;\">Migrate settings and configure drivers<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td>\u2193<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td style=\"border: solid 1px currentcolor;\">Boot into Windows 95<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td>\u2193<\/td>\n<\/tr>\n<tr>\n<td>&nbsp;<\/td>\n<td style=\"border: solid 1px currentcolor;\">Final setup<\/td>\n<td style=\"width: 1em;\">\u00a0<\/td>\n<td style=\"border: solid 1px currentcolor; border-left: none;\">\u00a0<\/td>\n<td align=\"left\">Windows 95 app<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>So that&#8217;s why Windows 95 setup is really three setup programs chained together. It allows a single copy of the code to be used for all three of the installation scenarios. Each program takes you one step closer to the goal. And everything got implemented only once.<\/p>\n<p>\u00b9 There was existing precedent for a tiny version of Windows that is barely enough to run a single program. The original Windows version of Microsoft Excel <a href=\"https:\/\/en.wikipedia.org\/w\/index.php?title=Microsoft_Excel&amp;oldid=166461028\"> came with a runtime version of Windows 2.1<\/a>, so that customers who didn&#8217;t have Windows could still use Excel.<\/p>\n<p>\u00b2 This hardware detection code that Setup uses is the same code that runs when you do hardware detection from within Windows 95 itself, so even that code needed to be written only once. It did have some runtime checks to change behavior slightly depending on whether it&#8217;s running in Windows 3.1 or Windows 95, but the vast majority of the code is identical.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Simplifying the problem to an earlier problem.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-110507","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>Simplifying the problem to an earlier problem.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/110507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=110507"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/110507\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=110507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=110507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=110507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}