Windows NT Shell Scripting / Edition 1

Paperback (Print)
Buy New
Buy New from BN.com
$26.08
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 93%)
Other sellers (Paperback)
  • All (29) from $1.99   
  • New (5) from $25.43   
  • Used (24) from $1.99   

Overview

Windows NT Shell Scripting is a comprehensive reference for network professionals. It is the only book available on the practical use of the Windows NT shell scripting language. The book begins with a high-level introduction to the shell language itself, then describes the shell commands that are useful for controlling or managing different components of a network, i.e. file management, etc. The second part of the book is a comprehensive reference of all the commands, organized by function, for easy reference by the reader.


Finally, it's here, a superb book on NT shell scripting. Designed for system and network administrators who want to go beyond the NT GUI (graphical user interface), this complete reference covers Windows NT scripting language, including shell command syntax. For ease of use, the scripting commands are organized by functional group. All information is based on Windows NT 4.0 Service Pack3 and the Windows NT 4.0 Resource Kit supplement 2. The book covers the Windows NT command shell, script parameters, script variables, control flow and script nesting. It contains a complete set of ready-to-use scripting solutions. You can use them as is or modify them to suit your requirements. The book provides case studies to demonstrate how scripting solutions are being used to solve real-life problems.

Read More Show Less

Editorial Reviews

From Barnes & Noble

Fatbrain Review

Finally, it's here, a superb book on NT shell scripting. Designed for system and network administrators who want to go beyond the NT GUI (graphical user interface), this complete reference covers Windows NT scripting language, including shell command syntax. For ease of use, the scripting commands are organized by functional group. All information is based on Windows NT 4.0 Service Pack3 and the Windows NT 4.0 Resource Kit supplement 2. The book covers the Windows NT command shell, script parameters, script variables, control flow and script nesting. It contains a complete set of ready-to-use scripting solutions. You can use them as is or modify them to suit your requirements. The book provides case studies to demonstrate how scripting solutions are being used to solve real-life problems.
Read More Show Less

Product Details

  • ISBN-13: 9781578700479
  • Publisher: Sams
  • Publication date: 4/17/1998
  • Series: Circle Series
  • Edition description: New Edition
  • Edition number: 1
  • Pages: 400
  • Sales rank: 1,081,596
  • Product dimensions: 6.00 (w) x 8.90 (h) x 0.90 (d)

Meet the Author


Tim Hill is an independent software developer specializing in systems software and operating system architectures. He has designed several real-time operating systems, including RMOS and PKS, the latter of which has been used extensively in mission-critical embedded systems such as ATMs and banking automation systems. Hill is a Microsoft® Windows NT MVP and consults extensively on all aspects of Windows NT integration and implementation. Currently, he is also the Cheif Technical Officer at Document Technologies, Inc., a developer of specialized medical and business imaging systems in Sunnyvale, California.
Read More Show Less

Read an Excerpt


From Part II: Real-World Scripting

...Description

The REPL script provides a general-purpose file and directory replication facility for Windows NT. Unlike the Windows NT replication service, all replication directories managed by REPL are "peers." That is, there are no "master" and "slave" (or export/import) directories. Instead, REPL treats all directories as export and import directories.

REPL manages sets of directories known as sites. A site is a set of one or more directory trees that are to be synchronized by the REPL facility. Sites are given arbitrary names to identify them, and REPL can support any number of sites, each containing any number of directories. Directories can be specified as local drive paths or UNC names. For example, a site named SAMPLE could contain the directories C:\Source, E:\Users\Source and \\LIBRARY\Archive\Source. When REPL updates the SAMPLE site, all the directories are synchronized so that the contents of each tree are identical. The full directory trees are synchronized, including all sub-directories.

Using UNC names for directories is recommended. REPL can perform replication runs with no user logged-in. In this case, networked drives may not be mapped as expected, and the replication can fail. Using UNC names avoids this problem, as the name is always valid, regardless of user logon state.

REPL synchronizes the directories within a site by performing a round robin copy of files from one directory tree to the next. Thus, if a site contains three directories, A, B, and C, the REPL script copies directory A to B, then B to C, and then C back to A. In this way, a file placed inany of the directories A, B or C will eventually be propagated to all three directories (although it can take up to two replication passes to complete the copy).

Actual directory replication is performed by ROBOCOPY command. Since this command only copies changed or new files, replication of directory trees is very efficient, and consumes a minimal amount of system bandwidth.

Replication occurs when a replication "run" is initiated. Runs can be executed manually, using the /RUN switch, or automatically at predetermined intervals, using the /START switch. Once automatic replication is started, it continues while the Windows NT computer is running (it is not necessary for a user to be logged in). In addition, all replication information is persistent (it is stored in the system registry), and replication automatically restarts whenever the Windows NT computer is restarted. Automatic replication relies upon the Windows NT Schedule Service, and so this service must be running for replication to proceed.

Use REPL(1) to display the status of the replication site named site-name. If site-name is absent, all replication sites are detailed. This command also displays the status of automatic replication (running or stopped).

Use REPL(2) and REPL(3) to edit the contents of a site, or create a new site. The /DELALL switch deletes an entire replication site, the /ADD switch adds the specified dir to the site, and the /DELETE switch deletes the specified dir. Multiple /ADD and /DELETE commands can be specified on a single REPL command line.

Use REPL(4) to enable or disable a site. Replication runs do not replicate disabled sites, but they can still be edited. New sites are always enabled by default.

Use REPL(5) to reset the entire replication facility, and delete all sites. The run/stop state of automatic replication is not changed by this command.

Use REPL(6) to start automatic replication, and REPL(7) to stop automatic replication. The /INTERVAL switch specifies the interval between replication runs (in minutes). The default is 60 minutes. The /FIRST switch specifies the interval to the first replication run after the facility is started. The default is one minute. Automatic replication uses the Scheduler Service on the local Windows NT computer, and so this must be running before automatic replication can be used. The /LOG switch specifies a log file. This file, if specified, accumulates the replication results (actually the report generated by the ROBOCOPY command).

Use REPL(8) to perform a manual replication run. This is useful when testing a replication setup before starting automatic replication, or to perform an immediate update of all replicated information. As a result of the algorithm used, two REPL(8) commands should be issued to ensure that complete peer replication has occurred...

Read More Show Less

Table of Contents

I. THE SCRIPT LANGUAGE.

1. The Basics of Scripts.

What Is a Script? The Console Window. The Options Tab. The Font Tab. The Layout Tab. The Colors Tab. Introducing Scripts. Script Arguments. Special Script Lines.

2. The Windows NT Command Shell.

Command Shell Basics. Command Shell Modes. CMD.EXE and COMMAND.COM. Starting a Command Shell. Terminating a Command Shell. Nesting Command Shells. Command Line Editing. Basic Character Editing. Template Editing. Command History Editing. Command Completion Editing. DOSKEY and Command Macros. Launching Applications from the Shell. Internal and External Commands. The PATH Command and PATHEXT Variable. Command Search Sequence. File Associations. Integrating New Script Languages with the Shell. The START Command. Controlling Script Output. REW. CLS. COLOR. TITLE. @. ECHO. NOW [RK]. Command Redirection. Running Multiple Commands. Using Command Filters. MORE. SORT. FIND. CLIP [RK]. The Windows NT Command Scheduler.

3. Script Parameters and Variables.

Variable Basics. Environment Variable Sources. Accessing Variables Using the Control Panel. Setting Variables. Variable Size Limits. Variable Substitution. Undefined Variables and Literal Percent Character Handling. Recursive Substitution. Returning Procedure Values. Substitution and Command Syntax. Variable Scope. Using SETLOCAL and ENDLOCAL. Variable Tunneling. Special Variables. Advanced SET Commands. Basic Expression Syntax. Number Formats. Logical Bit Operators. Assignment Operators. Evaluating Multiple Expressions. Special Variable Syntax. String Substitution. String Indexing. Indexed and Named Arrays. Script Parameters and Arguments. Parameter Substitution. Special Parameter Syntax. Using Double Quotes.

4. Control Flow, Procedures, and Script Nesting.

Simple Control Flow. Chaining Scripts. Nesting Scripts. Labels and the GOTO Command. Script Procedures. The CALL Command. Procedure State and Variable Scope. Passing Arguments to Procedures. Returning Values from Procedures. Procedure Structure. Using a MAIN Procedure. Complete Procedure Skeleton. Script Libraries. The IF Command. Simple IF Commands. Advanced IF Commands. Interactive Commands. PAUSE. TIMEOUT [RK]. SLEEP [RK]. CHOICE. COPY. The FOR Command. The File Iterator FOR Command. The Directory Iterator FOR Command. The Numeric Iterator FOR Command. The Test Parser FOR Command. Variable Recursion Using the FOR Command.

II. REAL WORLD SCRIPTING.

5. A Scripting Toolkit.

Building Scripts. Standard Script Skeleton. Standard Library Skeleton. An Example Library. VARDEL. PARSECMDLINE. GETARG. GETSWITCH. FINDSWITCH. REGSETM and REGSETU. REGGETM and REGGETU. REGDELM and REGDELU. SRAND. RAND. RESOLVE. GETINPUTLINE. GETSYNCFILE. SETSYNCFILE. DELSYNCFILE. WAITSYNCFILE. GETTEMPNAME.

6. User Management Scripts.

User Account Creation. The MAKEUSR Script. Syntax. Switches. Description. Example. Implementation. The USRQUOTA Script. Syntax. Switches. Description. Example. Implementation. The MTPLOGEON.BAT Script. Implementation. Customization.

7. Miscellaneous Scripts.

Ready to Use Scripting Techniques. The UNCBACK Script. Syntax. Description. Example. Implementation. The XCPTEST Script. Syntax. Switches. Description. Example. Implementation. The REPL Script. Syntax. Switches. Description. Example Implementation. The ANIMAL Script. Description. Implementation. A Final Word on Scripting.

III. SCRIPTING COMMAND REFERENCE.

Command Reference. Account Management Commands. System Management Commands. Application Control Commands. Network Management Commands. File and Directory Commands. Scripting Language Commands. Alphabetical Listing of Commands. ADDUSERS [RK] ASSOC ASSOCIATE [RK] AT, WINAT [RK] ATTRIB AUDITPOL [RK] AUTOEXEC.BAT CACLS, XCACLS [RK] CALL CD CHDIR, CD CHOICE [RK] CLIP [RK] CLS CMD COLOR COMMAND Command Line Editing Command Line Syntax COPY DATE DEL, ERASE DIR DIRUSE [RK] DISKUSE [RK] DOSKEY DUMPEL [RK] ECHO ENDLOCAL ERASE EXIT FC FIND FINDSTR FOR FTYPE GLOBAL [RK] GOTO IF IFMEMBER [RK] INSTSRV [RK] KILL [RK] Labels LOCAL [RK] LOGEVENT [RK] LOGOFF [RK] MD MKDIR, MD MORE MOVE NET ACCOUNTS NET COMPUTER NET CONFIG SERVER NET CONFIG WORKSTAT ION NET CONTINUE, NET PAUSE, NET START, NET STOP NET FILE NET GROUP, NET LOCALGROUP NET LOCALGROUP NET NAME NET PAUSE NET SEND NET SESSION NET SHARE NET START NET STATISTICS NET STOP NET TIME NET USE NET USER NET VIEW NOW [RK] NTBACKUP Parameter Syntax PATH PAUSE PERMCOPY [RK] POPD PROMPT PULIST [RK] PUSHD RD REG [RK] REM REN, RENAME RENAME REPLACE RMDIR, RD RMTSHARE [RK] ROBOCOPY [RK] SC [RK] SCLIST [RK] SCOPY [RK] SET SETLOCAL SHIFT SHUTDOWN [RK] SLEEP [RK] SOON [RK] SORT SRVINFO [RK] Standard Variables START SUBST TIME TIMEOUT [RK] TITLE TRANSLATE [RK] TYPE USRSTAT [RK] Variable Syntax VER WHOAMI [RK] VINAT XCACLS XCOPY.

IV. APPENDIXES.

A. The RCMD Resource Kit Utility.

RCMD Client and Target Computer Installation. Command Execution. RCMD Security Features.

B. Other Useful Command Line Tools.

Read More Show Less

Customer Reviews

Average Rating 5
( 2 )
Rating Distribution

5 Star

(2)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 2 Customer Reviews
  • Anonymous

    Posted July 19, 2000

    This is the scripting Bible!

    I bought this book based on the praise it has received online, and it was no disappointment. Extremely well written, concise, and accurate, we can only hope that other writers follow this style in future reference books. It should be on every NT power user's desk.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted June 16, 2000

    The DEFINATIVE Shell Scripting Resource

    Easy to read...complete Shell Scripting reference...affectionately known as the 'bible' of Shell Scripting. A MUST have!

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 2 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)