OSVersion() troubles

Windows specific forum
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

OSVersion() troubles

Post by GeoTrail »

When I run this code on Windows XP it returns Vista

Code: Select all

Procedure.s WindowsVersion()
  Select OSVersion()
    Case #PB_OS_Windows_NT3_51
      Result$ = "Windows NT 3.5"
    Case #PB_OS_Windows_95
      Result$ = "Windows 95"
    Case #PB_OS_Windows_NT_4
      Result$ = "Windows NT 4"
    Case #PB_OS_Windows_98
      Result$ = "Windows 98"
    Case #PB_OS_Windows_2000
      Result$ = "Windows 2000"
    Case #PB_OS_Windows_XP
      Result$ = "Windows XP"
    Case #PB_OS_Windows_Server_2003
      Result$ = "Windows Server 2003"
    Case #PB_OS_Windows_Vista
      Result$ = "Windows Vista"
    Case #PB_OS_Windows_Server_2008
      Result$ = "Windows Server 2008"
    Default
      Result$ = "Windows"
  EndSelect
    ProcedureReturn Result$
EndProcedure

Debug WindowsVersion()
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Its a 4.10 bug which the alpha testers like you failed to catch, thats why it is still around :P

its fixed for beta2
quidquid Latine dictum sit altum videtur
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

He he he I see :lol:
Oh well, probably just took an old guy to find it ;)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Post Reply