|
Sample
Login Script 1:
-------------------------------------------BEGIN
Option Explicit
Dim objNetwork
Dim strDriveLetter, strRemotePath, strUserName, strRemotePath2,
strDriveLetter2
strDriveLetter = "U:"
strRemotePath = "\\hydra\users"
Set objNetwork = WScript.CreateObject("WScript.Network")
strUserName = objNetwork.UserName objNetwork.MapNetworkDrive strDriveLetter,
strRemotePath & "\" & strUserName
'net time
dim sCommand,objShell set objShell = Wscript.CreateObject("Wscript.Shell")
sCommand = "cmd /c net time \\hydra"
objShell.run sCommand, 0, true
'net printers
'Set objNetwork = CreateObject("WScript.Network")
'objNetwork.AddWindowsPrinterConnection "\\hydra\HPLaserJ"
WScript.Quit
-------------------------------------------END
What this script does?
The purpose of this script is to connect new printers, map network
drives, and syncronize the time on the server.
Link:
http://www.iopus.com/guides/wsh.htm
|