Sign in to follow this  
Followers 0
Guest capt doufos

finding out what OS version a client is using.

8 posts in this topic

Hi,

I am new to this scripting melarky and I am sure this is a really simple question:

Basically I just need some code that will allow me to find out if and machine is running windows 2000 or XP then run the relevent file. I have already done the code for the file running so I just need the winver part.

IE:

What winver?

If 2000 then blah blah blah

If XP then blah blah blah

Thanks :whistle:

Share this post


Link to post
Share on other sites



Checkout the @OSxxxx macros in the helpfile

HTH

:whistle:

Share this post


Link to post
Share on other sites

Checkout the @OSxxxx macros in the helpfile

HTH

:whistle:

<{POST_SNAPBACK}>

Thanks :dance:

I totally overlooked that!!!!

Share this post


Link to post
Share on other sites

IE:

What winver?

If 2000 then blah blah blah

If XP then blah blah blah

Thanks :whistle:

<{POST_SNAPBACK}>

If @OSVersion = "WIN_2000" Then
;Code for Win2k
ElseIf @OSVersion = "WIN_XP" Then
;Code for WinXP
Else
;Code if it isn't either
EndIf

For other @OSVersion Values referr to the help file :-)


Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer

Share this post


Link to post
Share on other sites

Thankyou people, all working now :whistle:

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You do not need @osversion (Depending autoit version), Build etc. but only a Version Number:

My simple Workaround

$ver = FileGetVersion("Winver.exe")

if $ver < "6" Then ... ;its not Vista or Win7+ and so on...

Later i found a other way with a DLL Call:

See Thread:

http://www.autoitscript.com/forum/index....p?showtopic=75796&view=findpost&p=550743

Edited by Schindi

Share this post


Link to post
Share on other sites

You do not need @osversion (Depending autoit version), Build etc. but only a Version Number:

My simple Workaround

$ver = FileGetVersion("Winver.exe")

if $ver < "6" Then ... ;its not Vista or Win7+ and so on...

You are actually answering the question in this thread?

Did you see the date?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Sorry, but I need a solution, even if the Thread is older, i found this, and thought that this is not the solution.

But later i found a other way:

See Thread:

http://www.autoitscript.com/forum/index.php?showtopic=75796&view=findpost&p=550743

I Think this Thread is from You ;-)

And I will point out!

lg.

Schindi

Edited by Schindi

Share this post


Link to post
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
Sign in to follow this  
Followers 0