Jump to content

Windows 7 support


staples
 Share

Recommended Posts

@OSVersion detects WIN_VISTA

For this script I need to differenciate between vista and windows 7. I have searched the forums but have been unable to find a answer.

When will with @OSVersion be updated to display WIN_7?

Is there another way to detect Windows 7 that you use?

Link to comment
Share on other sites

When will with @OSVersion be updated to display WIN_7?

It already has. The stable version doesn't have it sinse it came before Win7, but the latest betas will report "WIN_7" as expected.
Link to comment
Share on other sites

I have been using this bit of code to assign the name of the OS to a variable that I can use elsewhere in my scripts.

Global $nOSversion = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion") ; Assign OS version number to variable

; Assign OS name to string variable depending on OS version number
Switch $nOSversion
    Case 6.1
        Global $sOSName = "Windows 7"
    Case 6.0
        Global $sOSName = "Windows Vista"
    Case 5.1
        Global $sOSName = "Windows XP"
    Case 5.0
        Global $sOSName = "Windows 2000"
    Case Else
        Global $sOSName = "Old Windows Version"
EndSwitch
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...