PureBasic Forum
https://www.purebasic.fr/english/

How can I detect what OS version is running from?
https://www.purebasic.fr/english/viewtopic.php?f=13&t=9780
Page 1 of 4

Author:  dagcrack [ Sun Mar 07, 2004 8:12 pm ]
Post subject:  How can I detect what OS version is running from?

I need to detect if the OS that my appl is running from is WINXP or olders.. etc.. This is because some of the features will be different in code but same in function for the user, you know what I mean? some older OS' has problems with some code that works at newer OS'.. and vice versa..
how to detect?

Author:  freak [ Sun Mar 07, 2004 8:29 pm ]
Post subject: 

Have a look at the OSVersion() command in the help file.

Timo

Author:  dagcrack [ Sun Mar 07, 2004 8:41 pm ]
Post subject: 

Ahhh thx

I tryed:
Debug OSVersion()


And it showed: 60

???? I don't get it..


_
Running on winxp pro.

Author:  GPI [ Sun Mar 07, 2004 8:49 pm ]
Post subject: 

RTFM!












(Because i think, you dont understand: Read the fucking manual)

Author:  merendo [ Sun Mar 07, 2004 8:56 pm ]
Post subject: 

*lol*, hehe!

Looks like you are a noob, dagcrack. Seriously, reading the manual helps. You can also take a look at some tutorials available at http://www.reelmediaproductions.com/pb.

Greetz!

Author:  dagcrack [ Sun Mar 07, 2004 9:01 pm ]
Post subject: 

I didnt had time for reading it... and dont call me noob cause you'll know how noob I am jeez. :evil:

Author:  thefool [ Sun Mar 07, 2004 9:03 pm ]
Post subject: 

newbie is better. I also ask some pretty stupid questions myself :)
Welocme.

Author:  DriakTravo [ Sun Mar 07, 2004 9:03 pm ]
Post subject: 

Let us embrace the newbs and teach them. After all, we were all newbs at one point. :)

Author:  thefool [ Sun Mar 07, 2004 9:07 pm ]
Post subject: 

can i ask a pretty stupid question?

When debug osversion() says 60, is it just the number of the constant or
what it returns? I know how to use it via the "IF" or via "Select case" or something else.

Author:  merendo [ Sun Mar 07, 2004 9:20 pm ]
Post subject: 

Code:
Debug #PB_OS_Windows_XP
Debug OSVersion()


If your Os is not WinXP, change it to the according constant.

@degrack: Sorry for noob, of course i meant newbie or 'unexperienced user'. You're right, noob is the wrong word.

Author:  DriakTravo [ Sun Mar 07, 2004 9:24 pm ]
Post subject: 

Here, mabe this will help:

Code:
Procedure.l GetOSVersion()
  ;If this procedure retruns 1, then the os is - Windows NT3 51
  ;If this procedure retruns 2, then the os is - Windows 95
  ;If this procedure retruns 3, then the os is - Windows NT 4
  ;If this procedure retruns 4, then the os is - Windows 98
  ;If this procedure retruns 5, then the os is - Windows ME
  ;If this procedure retruns 6, then the os is - Windows 2000
  ;If this procedure retruns 7, then the os is - Windows XP
  ;If this procedure retruns 8, then the os is - Windows Future
  If OSVersion() = #PB_OS_Windows_NT3_51
    ProcedureReturn 1
  ElseIf OSVersion() = #PB_OS_Windows_95
    ProcedureReturn 2
  ElseIf OSVersion() = #PB_OS_Windows_NT_4
    ProcedureReturn 3
  ElseIf OSVersion() = #PB_OS_Windows_98
    ProcedureReturn 4
  ElseIf OSVersion() = #PB_OS_Windows_ME
    ProcedureReturn 5
  ElseIf OSVersion() = #PB_OS_Windows_2000
    ProcedureReturn 6
  ElseIf OSVersion() = #PB_OS_Windows_XP
    ProcedureReturn 7
  ElseIf OSVersion() = #PB_OS_Windows_Future
    ProcedureReturn 8
  EndIf
EndProcedure

Author:  thefool [ Sun Mar 07, 2004 9:31 pm ]
Post subject: 

thanks

Author:  dagcrack [ Sun Mar 07, 2004 9:58 pm ]
Post subject: 

@ merendo
I'm not DEGCRACK, at least try to write my nick as it is :D as I did (emh... Ctrl C Ctrl V :P)

I am just new at this forum.
About PB I started a month ago I call my self a beginner at it.

Dont think that you're the best one... cause you'll end knowing you're no one. (hey I heard that phrase somewhere..)

Don't talk for the others please. :x

@GPI
Why you had to say badwords just for that? :(



Hey well I liked this forum, my name is Gus I'm 17. I have some knowladge of VB B+ B3D and now learning PB. And... I will never call my self an ace guy... and plus.. I will never say "you're a noob!!" cause that's the sad part... shows how lame you are sometimes... well anyway I gotta go, I'm busy at work so we talk later.. BTW.. I did read that part of the manual already :lol: :!:

Hey is there any thread where you guys shows your desktops (real ones.. desks.. your job environment ? ) cause its a funny idea to know how you work.

Author:  Dare2 [ Sun Mar 07, 2004 10:28 pm ]
Post subject: 

Howdy dagcrack,

Seems you got a rather warm-ish welcome from some. :)

Welcome aboard.

Author:  Kale [ Mon Mar 08, 2004 12:04 am ]
Post subject: 

Quote:
I didnt had time for reading it

C'mon man you've got to help yourself too! otherwise how will you learn?

Page 1 of 4 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/