Creating a Logon Script


A logon script is a batch file that's run automatically whenever a user logs on. The most common reason for using a logon script is to map the network shares that the user needs access to. For example, a simple logon script maps three network shares:

 echo off net use m: \\/server1\shares\admin net use n: \\server1\shares\mktg net use o: \\server2\archives 

Here, two shares on server1 are mapped to drives M and N, and a share on server2 is mapped to drive O.

If you want, you can use the special variable %username% to get the user's username. This strategy is useful if you created a folder for each user and you want to map a drive to each user's folder, as in this example:

 net use u: \\server1\users\%username% 

For example, if a user logs on with the username dlowe, drive U is mapped to \\server1\users\dlowe.

Tip 

Scripts should be saved in the Scripts folder, which is buried deep in the bowels of the SYSVOL folder-typically, c:\Windows\SYSVOL\Sysvol\ domainname \Scripts, where domainname is your domain name. Because you often need to access this folder, I suggest creating a shortcut to it on your desktop.

After you create a logon script, you can assign it to a user by using the Profile tab of the User Properties dialog box. For more information, see the section, "Setting a user's profile information," earlier in this chapter.




Networking For Dummies
Networking For Dummies
ISBN: 0470534052
EAN: 2147483647
Year: 2004
Pages: 254
Authors: Doug Lowe

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net