Jump to content

@OSVersion Trouble


Recommended Posts

By the way, it gets even worse if you start looking at the project names.

Are you referring to anything special? I found a list HERE and they seem to be mostly random.

Edit:Speeling

Edited by AdmiralAlkex
Link to comment
Share on other sites

All you need to know about checking if the version of windows is compatible with your code.

VerifyVersionInfo Function

VerSetConditionMask Function

Version Checking (Just Don’t Do It)

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Link to comment
Share on other sites

Are you referring to anything special? I found a list HERE and they seem to be mostly random.

Edit:Speeling

Thats actually what I was refering to. There was very little cosistency to the codenames other than the few that were named for various locations or features in the Whistler-Blackcomb area. Bill Gates has (had?) a condo there and spends a lot of time in the area.

On top of that you can add in the fact that a couple of codenames were re-used on different projects.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Thats actually what I was refering to. There was very little cosistency to the codenames other than the few that were named for various locations or features in the Whistler-Blackcomb area. Bill Gates has (had?) a condo there and spends a lot of time in the area.

On top of that you can add in the fact that a couple of codenames were re-used on different projects.

Okey I understand. (Nashville = :) )
Link to comment
Share on other sites

How would I detect if the OS version is equal to or greater that Windows Vista then?

Maybe these are mathimatical operators but

This works

If @OSVersion <> "WIN_VISTA" Then
MsgBox(0,"Operating System",@OSVersion)
EndIf

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Maybe these are mathimatical operators but

This works

If @OSVersion <> "WIN_VISTA" Then
MsgBox(0,"Operating System",@OSVersion)
EndIf

No it doesn't. I bolded the part you missed.

How would I detect if the OS version is equal to or greater that Windows Vista then?

Your code would fail hard on Win7 if you're running the beta or a future stable.

Something like this would be better:

If @OSBuild > 5999 Then
    MsgBox(0, "", "You're running Windows Vista or 7")
EndIf
Link to comment
Share on other sites

Hmmm...I just realized it would be easier if I just checked if imageres.dll existed...that way it would be fairly futureproof.

Only problem I can see is Windows Neptune, but seriously, how many uses that?

Windows Neptune!...Isn't that an OS halfway between 2000 and Whistler?

And yeah, the windows code names are quite random, but they usually mean something. For example Memphis(Windows 98) was a clue to an easter egg within the OS...

Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor.
Link to comment
Share on other sites

You can leave it as is with the exception of the If @OSVERSION statement. If imageres.dll doesn't exist there won't be an image on the control.

Edit: The easter egg clue for 98 was based on the code name, not the other way around. Vista started out life as Longhorn for which I have read various reasons.

1> Named after the Longhorn Saloon in Whistler (Possible)

2> Named after another mountain peak in the Whistler-Blackcomb region. (Probable)

3> Named after a ranch (not!)

It was finally changed to Vienna which was Microsofts way of saying "We want to make it clear that Bill is no longer in control."

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Something to munch on.

MsgBox (0, "Is " & @OSVersion & " later than WINXP?", _GreaterThanVersion ("WIN_XP"))

Func _GreaterThanVersion ($VER_STRING)
    Local $OS_ARRAY[5] = ["WIN_2000", "WIN_XP", "WIN_2003", "WIN_VISTA", "WIN_2008"] ; Array of OS Versions
    $want = __ArraySearchEx ($OS_ARRAY, $VER_STRING)
    $current = __ArraySearchEx ($OS_ARRAY, @OSVersion)
    IF $current >= $want Then Return True
    Return False
EndFunc

Func __ArraySearchEx ($array, $string)
    For $i = 0 to UBound ($array) - 1
        If $array[$i] = $string Then Return $i
    Next
    Return -1
EndFunc
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...