- Shopping Bag ( 0 items )
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.
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...
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.
A. The RCMD Resource Kit Utility.
RCMD Client and Target Computer Installation. Command Execution. RCMD Security Features.
B. Other Useful Command Line Tools.
Posted July 19, 2000
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 NoThank you for your feedback. Report this reviewThank you, this review has been flagged.
Posted June 16, 2000