Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve Windows Version 1

Status
Not open for further replies.

Glasgow

IS-IT--Management
Jul 30, 2001
1,669
GB
Is there a reliable way to retrieve the version of windows running on the web server?

The closest I've come is
Code:
Request.ServerVariables("SERVER_SOFTWARE")
but its behaviour does not seem very consistent. It returns a string that includes the OS under Vista but not under XP.
 
Thank you - I will investigate further. I thought I was on to something with USER_AGENT but that returns data about the remote user rather than server.
 
If Windows Scripting is on the server, you could try

Code:
Dim objShell
Set objShell=WScript.CreateObject("WScript.Shell")

WScript.Echo "The current operating system is: " & oShell.RegRead "HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProductName")

Set objShell = Nothing
WScript.Quit

Taken from a .vbs script


Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
I'll give that a whirl and report back thanks.
 
Thanks Chris - that works a treat.

You are clearly someone who really knows where his towel is :).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top