harpo
harpo

Reputation: 43228

How can I get the Windows version number from .NET?

I'm using a virtualized web server and I don't remember whether it's running Windows Server 2000 or 2003. How can I tell which?

Ask the ISP, course, which I did. The question, then, is somewhat academic. Is there any way to tell this from .NET?

I access the machine through Plesk, which is designed to shield you from this kind of arcana.

Why do I want to know this? Because I'm getting ready to install a product that is supported on 2003 but not 2000. (I know this doesn't mean it won't run.)

Upvotes: 0

Views: 232

Answers (2)

Grant Wagner
Grant Wagner

Reputation: 25951

When retrieving version information from System.Environment.OSVersion remember that checking file versions is surprisingly hard.

Upvotes: 0

Reed Copsey
Reed Copsey

Reputation: 564901

You can retrieve this from System.Environment.OSVersion.

Upvotes: 8

Related Questions