Determining OS version via Scripting
问题 I found this script on another site but I can not get it to work and I don't know batch scripting that well Set objWshShell = WScript.CreateObject("WScript.Shell") strOSVersion = objWshShell.RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\CurrentVersion") If strOSVersion = "5.1" Then Debug.WriteLine("Windows XP") Rem Insert Windows XP Statements ElseIf strOSVersion = "6.0" Then Debug.WriteLine("Windows Vista") Rem Insert Windows Vista Statements ElseIf strOSVersion = "6.1" Then