Jump to content

finding out what OS version a client is using.


Guest capt doufos
 Share

Recommended Posts

Guest capt doufos

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:

Link to comment
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
Link to comment
Share on other sites

  • 5 years later...

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
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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
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...