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

Script how to

Status
Not open for further replies.

jatallah

Technical User
May 10, 2002
6
US
I need all the info in regareds to how I can write a script,
and how I can introduce it to my enviroment.
thank you for your help
 
What do you need this script to do? Map a network drive? Map to a printer? Anything else? Here's a sample:

net use q: /delete

net use q: \\servername\sharedfolder

:done

Write up a script like this in notepad and save the document as logon.bat (for example - no .txt extension) and put it in your Domain Controller's "Netlogon" directory. Then, pick a user under Active directory and in the Logon Script text box enter logon.bat

Hope this helps. If you need more help on mapping to shared drives and printers, etc, let us know.
 
In this forum, 95/98. scripts are basically BATCH files.

You need to start by looking up BATCH HELP on Google for training and starters.


A BATCH file is just, sort of, a recording of typed commands that can be re-used over and over.

They need to be on the DOS PATH (more google lookups) to be in the 'environment' and then they may be used from any place on the computer (any folder).

AUTOEXEC.BAT is the famous one, the one that runs on startup.

If you are starting with DOS commands and batch files, Command Line Interpreters, a CLI, you definitely need to introduce a line into AUTOEXEC.BAT that says

DOSKEY /INSERT

Which allows you to type and retype easily commands in a DOS window.

Finally many DOS commands have built in helps, type the command and then /? as in

DIR /?

for a list of options.

With scripts you can get a complex task done once, and then

- Send it to others
- Use it any time

which is a huge advantage CLIs have over GUIs, while GUIs have different advantages.

There are other scripting environments and knowledge of one is a great help for others.

The DOS CLI is very primitive but not a bad place to start because of its ubiquity, almost any local techy can help.



 
I'm looking to write a login script for users.
This login script will map users to the shared folder and share department drive. We also user shared drive for excel sheets. Is there a way?
Thanks
 
First, you'll need to find out the name of the server where the "shared folder" is. Also, you will need the share name of the "shared folder." You'll also need the name of the shared folder where the excel sheets reside and the share folders for each department.

Let's say you have the accounting department's drive which happens to be drive t:

Look at it's name under my computer. for example

"acctgsharefolder" on "server1"(t:)

This would mean a folder on a server named "server1" has been assigned a share name of "acctgsharefolder" (right click the folder and click on 'sharing'

We have chosen to set a kind of shortcut to that folder across the network and have named our shorcut the t: drive.

You can also browse the network neighborhood to see which folders are shared on a machine.

Write back if you find out the name(s) of the server(s) and the share names of the directories.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top