|
Question : I'd like to make a batch file that would map network drives, add printers, add files, and install software...
|
|
How do I approach making a batch file that does the above and makes this happen the first time a user logs on to an SBS2000 domain with a windows XP sp2 machine? If a batch file is not capable of doing this what kind of program language is?
Many Thanks,
Ellsworth
|
Answer : I'd like to make a batch file that would map network drives, add printers, add files, and install software...
|
|
_______________________________Start Script On Error Resume Next
' ' Set constants and variables '
Dim wshShell Dim Domain Dim UserName Dim nUser
Set wshShell = WScript.CreateObject("Wscript.Shell") Set nUser = WScript.CreateObject("Wscript.Network")
Domain = nUser.UserDomain UserName = nUser.UserName
' ' Map Company Folder '
nUser.MapNetworkDrive "I:", "\\Server\Share" nUser.MapNetworkDrive "J:", "\\Server\Share2"
' 'Clean Up ' Set UserName=Nothing Set nUser=Nothing Set Domain=Nothing _____________________________________End Script
Thats script is to map 2 shares on the same server.
|
|
|
|