Page 1 of 1 1
Topic Options
#48361 - 1999-10-18 01:59 PM Which operating system
Anonymous
Unregistered


CAn Kixtart find out which operating system is running? Win95,Win98,Win2000 . . .
Top
#48362 - 1999-10-20 01:06 PM Re: Which operating system
Anonymous
Unregistered


Yes, you've got the @INWIN macro..
or you could use some code which distiguishes further. Such as:

;-----------------------------------------------------------------
; SUBROUTINE: check_os
; Determines what operating system and type is running on the host
; RETURNS:
; $os "Windows 95" = Windows 95
; "Windows 98" = Windows 98
; "Windows NT" = Windows NT
; $NT_type "Server" = Server
; "Server Domain Controller" = Either an NT server PDC or BDC
;
;-----------------------------------------------------------------
:check_os

; Select statements don't seem to like using @INWIN and @DOS... hmm wtf
;$inwin_str = @INWIN
;$dos_str = @DOS

$NT_Type = "" ; default to nothing unless NT is detected

IF @INWIN = 1
?"Windows NT detected"
$os="Windows NT"
; Determine what type of Windows NT
$rtn=ReadValue("hkey_local_machine\system\currentcontrolset\control\productoptions","producttype")
Select
Case $rtn="WINNT"
; /* System is a Windows NT Workstation */
$NT_Type = "Workstation"
Case $rtn="SERVERNT"
; /* System is running Windows NT Server (domain member) */
$NT_Type = "Server"
Case $rtn="LANMANNT"
$NT_Type = "Server Domain Controller"
EndSelect
Endif

If @INWIN = 2
Select
Case @DOS = "4.0"
$os = "Windows 95"
Case @DOS = "4.10"
$os = "Windows 98"
EndSelect
Else
$os = "Unknown"
Endif
Return


------------------
K Torkelson
Sys Admin Analyst
ktorkelson@providentfunding.com


Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.05 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org