{"id":13973,"date":"2010-05-20T07:00:00","date_gmt":"2010-05-20T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2010\/05\/20\/weve-traced-the-call-and-its-coming-from-inside-the-house-operating-system-names\/"},"modified":"2010-05-20T07:00:00","modified_gmt":"2010-05-20T07:00:00","slug":"weve-traced-the-call-and-its-coming-from-inside-the-house-operating-system-names","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20100520-00\/?p=13973","title":{"rendered":"We&#039;ve traced the call and it&#039;s coming from inside the house: Operating system names"},"content":{"rendered":"<p>\nAs the Windows Server 2003 project wound down,\nsomebody reported a serious bug that went something like this:\n<\/p>\n<blockquote CLASS=\"q\">\n<p>\n<b>Subject<\/b>: Windows Server 2003 still refers to itself as Windows .NET Server\n<\/p>\n<p>\nPrevious versions of Windows report the product name correctly,\nbut Windows Server 2003 still calls itself &#8220;Windows .NET Server&#8221;\ninstead of Windows Server 2003.\n<\/p>\n<pre>\n\/\/ on Windows XP\nC:\\&gt; osver\nWindows XP\n\/\/ on Windows 2000\nC:\\&gt; osver\nWindows 2000 Professional\n\/\/ on Windows 2000 Server\nC:\\&gt; osver\nWindows 2000 Server\n\/\/ on Windows NT 4 SP3\nC:\\&gt; osver\nWindows NT 4 SP3 Workstation\n\/\/ but on Windows Server 2003\nC:\\&gt; osver\nWindows .NET Server\n<\/pre>\n<p>\nI&#8217;ve attached a copy of the <code>osver<\/code> program\nyou can use to reproduce the problem.\n<\/p><\/blockquote>\n<p>\nIndeed, if you run the <code>osver<\/code> program attached to the\nbug report, it does report <code>Windows .NET Server<\/code> when\nrun on Windows Server&nbsp;2003.\nNow to find out where\n<code>osver<\/code> gets the product name from,\nso we can find and fix it.\n<\/p>\n<p>\nThe customer was kind enough to include the source code to the\n<code>osver<\/code> program, and we found some code in that program\nthat gave away the root of the problem:\n<\/p>\n<pre>\n...\nif (osv.dwMajorVersion == 5 &amp;&amp;\n    osv.dwMinorVersion == 2) {\n printf(\"Windows .NET Server\\n\");\n}\n...\n<\/pre>\n<p>\nWhen we pointed this out to the bug submitter,\nwe received a simple but gracious reply:\n<\/p>\n<p>\n&#8220;Oops. Sorry about that.&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As the Windows Server 2003 project wound down, somebody reported a serious bug that went something like this: Subject: Windows Server 2003 still refers to itself as Windows .NET Server Previous versions of Windows report the product name correctly, but Windows Server 2003 still calls itself &#8220;Windows .NET Server&#8221; instead of Windows Server 2003. \/\/ [&hellip;]<\/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":[25],"class_list":["post-13973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>As the Windows Server 2003 project wound down, somebody reported a serious bug that went something like this: Subject: Windows Server 2003 still refers to itself as Windows .NET Server Previous versions of Windows report the product name correctly, but Windows Server 2003 still calls itself &#8220;Windows .NET Server&#8221; instead of Windows Server 2003. \/\/ [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/13973","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=13973"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/13973\/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=13973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=13973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=13973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}