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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on writing scripts 3

Status
Not open for further replies.

randybreck

Technical User
Feb 21, 2003
22
US
I am new at network administration and would like to know more about writing scripts. Does anyone know and good tutorials that might help me. I am not even sure what type of language the scripts need to be written in: DOS, VB, etc. Any help will be appreciated.
 
hi,

Wriring scripts using dos is not a hard job for this thing you need to know the basic commands on dos. For information on command you can check out "HELP" in windows 2000. I think using windows "help" is the best way to know the commands.

You can start from mapping the drives
Mapping directories:
-----------------------
syntax: net use <driveletter>: \\<computername>\<sharename> [/yes]

example:
rem map to common shared directory
net use c: \\server01\common
rem map to user's home directory in file server
net use h: \\server02\%username%
Notes:
You can replace <sharename> with %username% if you share out the user's home directory using the same name as his/her login name.
Some smart aleck half-baked user might just have just used your avourite drive letter to map to somebody else's share. When that happens, the user will get a &quot;you have already mapped h: to \\dumbo\share, do you want to map to \\server02\jack instead?&quot; message, or something like that. That's what the /yes switch is for. It serves as a yes response from the user, so he will map to your desired share, whether he likes it or not. (Of course, he could always re-map it after logon, but that's another story).

Mapping to Home directory:
-------------------------------
syntax: net use <driveletter>: /home

example: net use h: /home

Note: You can use this if you have specified the user's home directory in the profiles box under User Manager For Domains.

Mapping Printers:
--------------------
net use <portname>: \\computer\printersharename [/yes]

example: net use lpt2: \\printserver01\HPLJ5-Marketing


Some variables:
%username% - Username
%userdomain% - Domain where the user is logging in

Some commands:
start - command to start a batch file.

Synchronization:
------------------
Your login scripts are located at the &quot;\ Winnt\ System32\ Repl\ Export\ Scripts&quot; directory.

OR try &quot;kixstart&quot;


There are lots of other ways also to write the script like VB , Pearl.... etc
Hope this helps :) Aslam
 
Great info. Looks like I have my work cut out for me. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top