May 20th, 2010

We've traced the call and it's coming from inside the house: Operating system names

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 “Windows .NET Server” instead of Windows Server 2003.

// on Windows XP
C:\> osver
Windows XP
// on Windows 2000
C:\> osver
Windows 2000 Professional
// on Windows 2000 Server
C:\> osver
Windows 2000 Server
// on Windows NT 4 SP3
C:\> osver
Windows NT 4 SP3 Workstation
// but on Windows Server 2003
C:\> osver
Windows .NET Server

I’ve attached a copy of the osver program you can use to reproduce the problem.

Indeed, if you run the osver program attached to the bug report, it does report Windows .NET Server when run on Windows Server 2003. Now to find out where osver gets the product name from, so we can find and fix it.

The customer was kind enough to include the source code to the osver program, and we found some code in that program that gave away the root of the problem:

...
if (osv.dwMajorVersion == 5 &&
    osv.dwMinorVersion == 2) {
 printf("Windows .NET Server\n");
}
...

When we pointed this out to the bug submitter, we received a simple but gracious reply:

“Oops. Sorry about that.”

Topics
Code

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.