Sign in to follow this  
Followers 0
willwatters

Code to detect operating system

7 posts in this topic

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



;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

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

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

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

Share this post


Link to post
Share on other sites

I changed WIN2000 TO WIN_2000 and it works.

Thanks for your help.

Share this post


Link to post
Share on other sites

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

<{POST_SNAPBACK}>

Tip: Use the macro listed in the helpfile @OSVersion for detect the OS. Compare the strings.

Share this post


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