Question : Scripts i.e .bat files

I am using a Dell Poweredge server running Windows 2000 server. I have active directory installed and I have set up a domain controller.

I am still not not sure about these .bat files. I have been offerdd the following advice:

A Domain Environment makes things much easier.

You can create a batch file using notepad and save the file as MapHome.bat

Net Use z: /delete /y
Net Use z: \\SernverName\ShareName /y

Save the batch file in the share \\ServerName\NetLogon on the Domain Contoller
or in the shared folder c:\WinNT\SysVol\FQDN\scripts on your domain Controller.  This folder is shared as NetLogon

where FQDN is the fully qualified domain name for your DS.

However, I still need some clarification. The advice above regarding creating a batch file, is that all the commands I need? And should I be naming the files after the  users rather than MapHome.bat in the logon script field?
 
Looking at some example .bat files, one begins

@echo off

Net Use /PERSISTENT:NO > NUL

Net time \\server /set /yes

Echo connecting drives please wait........
@echo off

Net use p:\\server\user$
net use g:\\server\public  

etc


Echo Thanks for your patience !!

Is this for Windows NT4 or can I use it for W2K?

I should be most grateful if further help and explanations could be offered regarding writing batch files.

Peter

Answer : Scripts i.e .bat files

Line by line....


@echo off

This line turns off the echo.  When you normally run a batch file the commands are displayed on the screen, with echo off, the commands are not displayed on the screen only the results of thos commands.

Net Use /PERSISTENT:NO > NUL

States that the following net use statements to not persist (do not stay) when the user logs off /computer resets.  So they must be re-applied everytime a the user logs on.

Net time \\server /set /yes

This sets the users computer time to the same time as the servers time.  Used for syncing time between a users computer and server.

Echo connecting drives please wait........

Displays "connecting drives please wait......"

@echo off

Same as other echo off statement

Net use p:\\server\user$

Maps the drive p to the hidden folder called user on the server.

net use g:\\server\public  

Maps the drive g to the public share on the computer named server.


Cheers,
IceRaven.
Random Solutions  
 
programming4us programming4us