Hello All,

First, I recommend Symantec's Ghost instead of re-installing. If you make an image of each computer variation you have, when a problem arises on that computer, you just re-image it. It is quite fast and certainly much easier than going through a total re-install.

Second, here is a segment of script that you may use to differentiate between a Win9x workstation and a WinNT workstation:

code:

;****************************************************************************************
:OSTYPE
; Description:
; This subroutine will determine if the user if logging in from Win9x or Windows NT.
; If the user is logging in from NT, it will also determine if the NT computer is a
; workstation or a server. With a few edits, it could also determine the difference
; between just a server and a domain controller. Also with just a few edits, it could
; determine the difference between Win95 and Win98. These haven't been implemented at
; this time because I did not see a need at this site for such granularity. The
; sserver array is used to hold the names of those workstations that have NT Server
; installed on them (used by developers). I still want to treat them as workstations.
;
; Input:
; $HKLM_S, $sys
;
; Output:
; $server (returns 0 for Win9x, 1 for NT), $WinDir (returns base windows directory),
; $OS (returns "Windows NT" or "Win9x"), $comd (dos command program)
;****************************************************************************************
; Modification History
; Date Initials Description
; 10 Aug 99 bvv Wrote first cut.
;****************************************************************************************
;
Global $server, $OS, $comd, $WinDir
Dim $key, $WksType, $returncode, $loop_count
;
$server=0
? "Determining the OS type and setting the command variable."
If @INWIN=1 ; INWIN returns a 1 if being run from Windows NT
$key=$HKLM_S+"\Microsoft\Windows NT\CurrentVersion"
$WinDir=ReadValue($key,"SystemRoot")
$OS="Windows NT"
; If logging in from Windows NT, check to see if you are on a Server or a
; Workstation. The key:
; HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions\ProductType
; has the following three possible values:
; WinNT if on a workstation
; ServerNT if on a server
; LanmanNT if on a domain controller (primary or backup)
; Right now, we are only concerned if the computer is a server. So,
$key="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions"
$WksType=ReadValue($key,"ProductType")
$returncode=@ERROR
If $returncode>0
? "There was an error reading: "+$key+"\ProductType"
? "The error number is: "+$returncode
Else
If (($WksType = "LanmanNT") or ($WksType = "ServerNT"))
$server=1
Endif
Endif
$comd="$sys\cmd.exe /c "
Else
$key=$HKLM_S+"\Microsoft\Windows\CurrentVersion\Setup"
$WinDir=ReadValue($key,"WinDir")
; Will set the OS variable to Win9x. If necessary to check for difference between
; Win95 and Win98 later, @DOS will report 4.0 for Win95 and 4.1 for Win98
$OS="Win9x"
$comd="$WinDir\command.com /c "
Endif
? "This system is: "+$OS+" and the current windows directory is: "+$WinDir
Return
;

Hope this helps.

------------------
Regards,

Brad
Consultant
Net InfraStructure, Inc