Jump to content
Sign in to follow this  
willwatters

Code to detect operating system

Recommended Posts

willwatters

What is the code to detect if the operating system is Windows 2000 or Windows XP please?

Share this post


Link to post
Share on other sites
dinodod

;System Test - tested only on XP SP2 Systems

If @OSVersion <> "WIN_XP" THEN

Msgbox(16,"", "This is not Windows XP")

EndIf

Look in the help file.


Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

Share this post


Link to post
Share on other sites
dj_judas21

What is the code to detect if the operating system is Windows 2000 or Windows XP please?

<{POST_SNAPBACK}>

Hope this helps - the key here is the macro @OSVERSION. All in the help file!

$os = @OSVERSION
select
 case $os = "WIN2000"
  msgbox(64,"OS Version","Windows 2000")
 case $os = "WIN_XP"
  msgbox(64,"OS Version","Windows XP")
endselect

Share this post


Link to post
Share on other sites
willwatters

Hope this helps - the key here is the macro @OSVERSION. All in the help file!

$os = @OSVERSION
select
 case $os = "WIN2000"
  msgbox(64,"OS Version","Windows 2000")
 case $os = "WIN_XP"
  msgbox(64,"OS Version","Windows XP")
endselect

<{POST_SNAPBACK}>

Sorry But this does not work. What is the code please?

Share this post


Link to post
Share on other sites
willwatters

Sorry none of this code works. Please correct the code. Thanks.

Share this post


Link to post
Share on other sites
willwatters

I changed WIN2000 TO WIN_2000 and it works.

Thanks for your help.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.