For determining OS here is a vbscript:
'========= Declarations =================
Option Explicit
'Define variables
Dim sOStype
Dim iRetVal
'========= Main code =================
'Display a string for OS type rather than a number
iRetVal = GetOSType
Select Case iRetVal
Case 0
sOStype = "Not found"
Case 1
sOStype = "Windows 95"
Case 2
sOStype = "Windows 98"
Case 3
sOStype = "Windows Me"
Case 4
sOStype = "Windows NT"
Case 5
sOStype = "Windows 2000"
Case 6
sOStype = "Windows XP"
End Select
msgbox(sOStype)
'========= Procedures and functions ==============
Function GetOSType
'Declare local variables
Dim sOSType 'Temp variable to store values from registry
Dim oWshShell 'Needs the Shell object to access registry
'Initialize
Set oWshShell = WScript.CreateObject("WScr
GetOSType = 0
'Get OS Info from registry
On Error Resume Next
'Initially assume Win9x platform
sOSType = oWshShell.RegRead("HKLM\SO
If sOSType = Empty Then
'If variable still empty then NT platform is used
'Read version from registry to find type of NT platform
' "CurrentVersion"="4.0"
' "CurrentVersion"="5.0"
sOSType = Trim(oWshShell.RegRead("HK
If sOSType = "5.1" Then
'Windows XP
GetOSType = 6
ElseIf sOSType = "5.0" Then
'Windows 2000
GetOSType = 5
ElseIf sOSType = "4.0" Then
'Windows NT 4.0
GetOSType = 4
End If
Else
'Find type of Win9x platform
' "Version"="Windows 98"
' "Version"="Windows 95"
' "Version"="Windows Millennium Edition"
If InStr(1,sOSType,"Millenniu
'Windows Me
GetOSType = 3
ElseIf InStr(1,sOSType,"98",0) > 0 Then
'Windows 98
GetOSType = 2
ElseIf InStr(1,sOSType,"95",0) > 0 Then
'Windows 95
GetOSType = 1
End If
End If
On Error Goto 0
'Clean up
Set oWshShell = Nothing
End Function
Main Topics
Browse All Topics





by: gavin_wickensPosted on 2004-11-20 at 06:44:28ID: 12633715
Windows 2000 and above supports deep root mapping, this means that you can map a drive to any folder beneth a share. NT can't do this so you could share each folder, eg share application and share document.
then update the script to read:
Net Use H: \\Server1\Data > Nul
Net Use I: \\Server1\Application > Nul
Net Use J: \\Server1\New > Nul
Net Use K: \\Server1\Document > Nul
Net Use L: \\Server1\IT > Nul
Net Use M: \\Server1\Human > Nul