Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 10th, 2025, 10:49 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Checking Windows
PostPosted: April 22nd, 2005, 9:05 am 
Offline

Joined: November 19th, 2004, 12:48 pm
Posts: 4
Location: The Netherlands
Is there a way to check on users Pc which windows version they are using? I want to use some system tools but they are situated on different locations in Windows 98, Windows 2000 and Windows XP.

Thanks for any advice.


For this message cajonpeter has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 22nd, 2005, 9:12 am 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
capture output to "ver" command. Only have WIndows 2000 box, so not sure what you use for other o/s versions.

i.e.
C:\>ver

Microsoft Windows 2000 [Version 5.00.2195]


For this message eomc40 has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 22nd, 2005, 9:19 am 
Offline

Joined: November 19th, 2004, 12:48 pm
Posts: 4
Location: The Netherlands
Thanks I got it!


For this message cajonpeter has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 22nd, 2005, 9:50 am 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
Did you find something generic to work with all o/s versions?


For this message eomc40 has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 22nd, 2005, 11:04 am 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
Just use the SYSTEM_OPERATING_SYS variable. From the help:

SYSTEM_OPERATING_SYS – provides the Windows platform for the system e.g. 2000 – meaning a Windows 2000 machine.
The possible values for this variable are:

Value - Operating System
NT3 - Windows NT 3.51
95 - Windows 95
98 - Windows 98
ME - Windows Me
NT4 - Windows NT 4.0
2000 - Windows 2000
XP - Windows XP
2003 - Windows Server 2003


For this message Duncan Lilly has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: XP Service Packs
PostPosted: April 26th, 2005, 4:56 pm 
Offline

Joined: April 21st, 2005, 4:47 pm
Posts: 43
Location: Southampton, UK
To save anyone having to reinvent the wheel, here's a code snippet to distinguish between XP SP1 and SP2 platforms.

Code:
// The base Windows o/s is held in the system variable SYSTEM_OPERATING_SYS
// (see online help for values)
// but you will need to set up a separate publication variable (here: OS_SERVICE_PACK)
// & run a dedicated check for Service Packs.  This one is so far for XP only
// and will return "Service Pack 1" (1 and 1a), "Service Pack 2" or (presumably)
// empty for no SP, tho I've not tested this.
function GetSP()
{
   if (SYSTEM_OPERATING_SYS == "XP")
   {
      OS_SERVICE_PACK = ReadRegistryKey("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "CSDVersion")
   }
}


For this message Linnet has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 26th, 2005, 8:00 pm 
Offline

Joined: November 19th, 2004, 12:48 pm
Posts: 4
Location: The Netherlands
Everybody who helped, thanks a lot. I didn't know it was so simple. I completely overlooked the SYSTEM_OPERATING_SYS. It was not in my user guide? I am not sure, but anyway great help here on the forum.

_________________
Using OPUS PRO 2.81, Windows XP Professional SP2


For this message cajonpeter has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 73 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group