Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Scripts

Status
Not open for further replies.

netcashin

Programmer
Joined
Nov 13, 2000
Messages
159
Location
US
This is really a basic question. I am a programmer who by default has to also care for a network (Windows 2000).

I am just wanting to have a script run when users log on that map some network drives. I have correct script written and it works when I run it in a batch file.

Two questions.

1. What extension does a script file need to run at login. A .bat extension?

2. How do I set up the user to use the script? I have tried putting the path of the script file (.bat) in the 'Profile Path' textbox in the 'Profile' tab of a user and that isn't working.

Please be patient with me, I am really a novice at networking.

Thanks in advance.
 
1. Place the logon script (suffix .bat) in the folder here:

%systemroot%\SYSVOL\sysvol\%userdnsdomain%\scripts

2. on the Profile tab for the user, set the login script name in the field Logon Script

It works like this:

User types name and password
Server authenticates
Server creates drive Z: to attach to %logonserver%\NETLOGON
Executes script from drive Z:
Removes Drive Z:

If you notice the scripts folder is shared as READ-ONLY with the name NETLOGON

Also don't use any network shares that use drive Z:
 
Do you have Active directory on your 2000 server?

If yes, you'll have to use AD Users & Computers

When opened rightclick on your Organizational Unit where you've put your users in and choose properties

Click the group policy tab and click new (if there isn't any you can use)

Click Edit

Under User Configuration expand Windows Settings and the click Scripts (Logon/Logoff)

In the details-pane, double click logon and then in the logon properties box, click show files

Open explorer and locate your script (leave the rest open)

Copy the script from the folder to the logon folder

Close the logon folder

In the properties dialog box for the script type, click add, click browse, select the script and click open

Add parameters if necessary and then click OK

I hope you can follow !!

Blutch
 
C:\WINNT\SYSVOL\sysvol\domainname.com\scripts is where I put my batch files. 2. on the Profile tab for the user, set the login script name in the field Logon Script. RRAS is correct on that. I use even simple batch files for the scripts. (Play with it. Make a batch file like
cls
ipconfig /all
pause

Save as ip.batch, in the location we told you, put the name of the batch file in the profiles tab on your account and just log off after your replication is done. Have fun. ;) Glen A. Johnson
Microsoft Certified Professional
glen@nellsgiftbox.com
[americanflag]

"What really happens is trivial in comparison to what could occur."
Robert von Musil (1880-1942); Austrian author.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top