Some example login scripts
A feature of a Windows network is the ability to setup scratch drives and printers for users, via a login script. Here are some example scripts that might work for you, with a bit of modification.
Allocate a share
- Go to C:\WINDOWS\sysvol\sysvol\yourDomain.local\scripts
- Create a new document called Students.bat and edit it as follows...
net use s: /d
net use s: \\YourServer\Students$
In Active Directory, go to the Profile tab for a student's user account properties and enter Student.bat for the Logon script (note that this is case-sensitive).
Allocate a printer
- Go to C:\WINDOWS\sysvol\sysvol\yourDomain.local\scripts.
- Create a new document called Print.vbs and edit it as follows...
Go to C:\W
' ****************** Header
Option Explicit
Dim wshNet
Dim oNetwork, sPrintPath
Set wshNet = CreateObject("WScript.Network")
Set oNetwork = CreateObject("WScript.Network")
Select Case oNetwork.ComputerName
' ****************** What to do for each computer in the Classroom
Case "Classroom-01"
sPrintPath = "\\PRINTSERVER\Classroom-A4"
oNetwork.AddWindowsPrinterConnection sPrintPath
oNetwork.SetDefaultPrinter sPrintPath
' ****************** The end of this script
End Select
Note that this script will allocate the shared printer called Classroom-A4 to the computer called Classroom-01. Again you'll need to use Active Directory, and go to the Profile tab for a student's user account properties and enter Print.vbs for the logon script.
Thanks for visiting.