Scripting and Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
Windows Script Host 514
Build a VBScript Script 514
Use Variables to Store and Manipulate Information 515
Give Your Scripts an Interface with the InputBox and
MsgBox Commands 516
Creating Interactive Scripts with Conditional Statements 518
Using Loops, Using Loops, Using Loops 519
Make Building Blocks with Subroutines and Functions 520
Object References 523
How to Run Applications 523
How to Access the Registry 524
How to Manipulate Files 526
How to Create Windows Shortcuts and Internet Shortcuts 530
How to Use the Network 531
How to Control Internet Explorer 533
How to Use Command-Line Parameters 534
How to Manage Windows Services 536
How to Write CGI Scripts for Web Servers 537
Decipher Script Errors 540
Find a Better Editor 543
Further Study 543
Make a Startup Script 544
Wacky Script Ideas 546
Quick and Dirty Backup Tool 546
Internet Fishtank 548
Quick SendTo Shortcut Creator 550
Rename Files with Search and Replace 551
Command Prompt Scripting 552
DOS Commands 553
Batch Files 556
Variables and the Environment 557
xii | Table of Contents
Flow Control 559
Command-Line Parameters 559
Conditional Statements 561
Loops 562
Simulating Subroutines 563
Get to the Command Prompt Quickly 563
Windows PowerShell 564
CmdLets and Aliases 565
Pipelines 567
PowerShell Variables 568
PowerShell Scripts 570
Automate Scripts with the Task Scheduler 571
A.
Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25