Introduction |
|
xxxv | |
Goal of This Book |
|
xxxv | |
What You Need to Begin |
|
xxxvi | |
Conventions Used in This Book |
|
xxxvi | |
|
PART I INTRODUCING MICROSOFT VBSCRIPT |
|
|
1 | (220) |
|
|
3 | (24) |
|
|
4 | (5) |
|
|
5 | (1) |
|
Visual Basic Family of Programming Languages |
|
|
6 | (1) |
|
|
7 | (1) |
|
Visual Basic for Applications |
|
|
8 | (1) |
|
VBScript Execution Environments |
|
|
9 | (1) |
|
VBScript Web Page Development |
|
|
9 | (9) |
|
|
10 | (1) |
|
Adding VBScript to Web Pages |
|
|
11 | (1) |
|
|
11 | (3) |
|
|
14 | (3) |
|
Referencing External Scripts |
|
|
17 | (1) |
|
|
18 | (8) |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
21 | (1) |
|
|
22 | (1) |
|
|
22 | (1) |
|
The Windows Command Prompt |
|
|
23 | (3) |
|
|
26 | (1) |
|
Errors, Constants, and Variables |
|
|
27 | (26) |
|
|
28 | (1) |
|
VBScript Statement Syntax |
|
|
29 | (6) |
|
|
30 | (3) |
|
Displaying Syntax Errors within Internet Explorer |
|
|
33 | (2) |
|
Documenting VBScripts with Comments |
|
|
35 | (3) |
|
Storing and Retrieving Data from Memory |
|
|
38 | (10) |
|
|
38 | (1) |
|
|
38 | (2) |
|
Referencing VBScript Run-Time Constants |
|
|
40 | (3) |
|
|
43 | (1) |
|
|
44 | (2) |
|
|
46 | (1) |
|
Variable Scope and Lifetime |
|
|
47 | (1) |
|
|
48 | (1) |
|
Using Operators to Manipulate Variables |
|
|
48 | (3) |
|
|
51 | (1) |
|
|
52 | (1) |
|
Conditional Logic and Iterative Structures |
|
|
53 | (20) |
|
|
54 | (5) |
|
|
54 | (1) |
|
|
55 | (1) |
|
Advanced Comparison Operations |
|
|
55 | (1) |
|
Alternative Forms of the If Statement |
|
|
56 | (1) |
|
Nesting Multiple If Statements |
|
|
57 | (1) |
|
The Select Case Statement |
|
|
57 | (2) |
|
|
59 | (11) |
|
|
59 | (4) |
|
|
63 | (2) |
|
|
65 | (2) |
|
|
67 | (1) |
|
|
68 | (2) |
|
Guarding against Endless Loops |
|
|
70 | (2) |
|
|
72 | (1) |
|
|
73 | (22) |
|
Organizing VBScript into Procedures |
|
|
74 | (2) |
|
Enhanced Script Maintenance |
|
|
74 | (1) |
|
|
75 | (1) |
|
Subroutines vs. Functions |
|
|
76 | (4) |
|
|
76 | (2) |
|
|
78 | (2) |
|
Controlling Variable Scope |
|
|
80 | (1) |
|
|
81 | (6) |
|
Examining Events and Event Handlers |
|
|
81 | (2) |
|
Setting Up Event Handlers |
|
|
83 | (4) |
|
|
87 | (6) |
|
|
93 | (2) |
|
|
95 | (24) |
|
Storing Related Data in Arrays |
|
|
96 | (1) |
|
Working with Single-Dimension Arrays |
|
|
97 | (8) |
|
Defining Single-Dimension Arrays |
|
|
97 | (1) |
|
Populating a Single-Dimension Array |
|
|
98 | (1) |
|
Processing a Single-Dimension Array |
|
|
99 | (1) |
|
|
99 | (1) |
|
|
100 | (2) |
|
Using the UBound Function |
|
|
102 | (3) |
|
Working with Multidimensional Arrays |
|
|
105 | (4) |
|
Defining Multidimensional Arrays |
|
|
105 | (1) |
|
Populating a Multidimensional Array |
|
|
106 | (1) |
|
Processing Multidimensional Arrays |
|
|
107 | (2) |
|
|
109 | (7) |
|
|
110 | (1) |
|
Resizing Single-Dimension Dynamic Arrays |
|
|
110 | (5) |
|
Resizing Multidimensional Dynamic Arrays |
|
|
115 | (1) |
|
|
116 | (1) |
|
Using VBScript Functions to Work with Arrays |
|
|
116 | (2) |
|
Using the VBScript Array() Function |
|
|
116 | (1) |
|
Using the IsArray() Function |
|
|
117 | (1) |
|
|
118 | (1) |
|
Data Collection, Notification, and Error Reporting |
|
|
119 | (26) |
|
|
120 | (1) |
|
|
121 | (11) |
|
Defining the InputBox() Function |
|
|
122 | (2) |
|
|
124 | (3) |
|
|
127 | (1) |
|
|
127 | (2) |
|
|
129 | (1) |
|
|
130 | (2) |
|
|
132 | (5) |
|
Defining the MsgBox() Function |
|
|
132 | (4) |
|
|
136 | (1) |
|
|
137 | (6) |
|
Deciding Not to Take Action |
|
|
138 | (1) |
|
Telling VBScript to Ignore Errors |
|
|
138 | (1) |
|
Developing Error-Handling Routines |
|
|
139 | (3) |
|
|
142 | (1) |
|
|
143 | (1) |
|
|
143 | (2) |
|
|
145 | (22) |
|
VBScript Object-Based Programming |
|
|
146 | (3) |
|
Properties Belonging to VBScript's Built-in Objects |
|
|
148 | (1) |
|
Methods Belonging to VBScript's Built-in Objects |
|
|
148 | (1) |
|
Working with VBScript's Built-in Objects |
|
|
149 | (10) |
|
|
149 | (1) |
|
|
149 | (1) |
|
|
150 | (1) |
|
Creating Variables, Properties, and Methods |
|
|
150 | (2) |
|
Setting Up Initialization and Termination Procedures |
|
|
152 | (1) |
|
The RegExp Object and Other Related Objects |
|
|
153 | (3) |
|
|
156 | (1) |
|
|
157 | (2) |
|
Other Collections of Objects Available to VBScript |
|
|
159 | (9) |
|
|
159 | (1) |
|
Objects Available When Executed in the WSH |
|
|
160 | (2) |
|
Properties Belonging to VBScript Run-Time Objects |
|
|
162 | (2) |
|
Methods Belonging to VBScript Run-Time Objects |
|
|
164 | (2) |
|
The Run-Time Dictionary Object |
|
|
166 | (2) |
|
|
168 | |
|
VBScript and Internet Explorer |
|
|
167 | (28) |
|
Internet Explorer Objects |
|
|
168 | (9) |
|
Examining the DHTML Object Model |
|
|
171 | (2) |
|
|
173 | (4) |
|
High-Level Browser Objects |
|
|
177 | (11) |
|
Working with the window Object |
|
|
178 | (2) |
|
Working with the document Object |
|
|
180 | (2) |
|
Working with the location Object |
|
|
182 | (2) |
|
Working with the history Object |
|
|
184 | (1) |
|
Working with the navigator Object |
|
|
185 | (3) |
|
|
188 | (6) |
|
|
190 | (2) |
|
Mouse and Keyboard Events |
|
|
192 | (2) |
|
|
194 | (1) |
|
|
195 | (26) |
|
|
196 | (13) |
|
|
197 | (1) |
|
WSH Object Properties and Methods |
|
|
198 | (2) |
|
|
200 | (2) |
|
Using WSH Object Properties |
|
|
202 | (2) |
|
|
204 | (3) |
|
|
207 | (2) |
|
Passing Arguments to Scripts |
|
|
209 | (3) |
|
Using XML to Create Windows Script Files |
|
|
212 | (7) |
|
|
214 | (1) |
|
|
214 | (1) |
|
The <comment> and </comment> Tags |
|
|
215 | (1) |
|
The <script> and </script> Tags |
|
|
215 | (1) |
|
The <job> and </job> Tags |
|
|
216 | (1) |
|
The <package> and </package> Tags |
|
|
217 | (1) |
|
The <resource> and </resource> Tags |
|
|
218 | (1) |
|
Running Your Windows Script Files |
|
|
219 | (1) |
|
|
219 | (2) |
|
PART II PROFESSIONAL PROJECT 1 |
|
|
221 | (2) |
|
Project 1 Desktop Administration Using VBScript and the WSH |
|
|
223 | (138) |
|
|
224 | (1) |
|
Project Case Study: Desktop Customization and Deployment |
|
|
225 | (18) |
|
|
226 | (15) |
|
Analyzing the Existing Process |
|
|
228 | (8) |
|
Determining Which Tasks Can Be Automated |
|
|
236 | (1) |
|
Performing a High-Level Design |
|
|
237 | (1) |
|
|
238 | (1) |
|
|
238 | (1) |
|
|
239 | (1) |
|
|
239 | (1) |
|
|
240 | (1) |
|
|
240 | (1) |
|
|
241 | (2) |
|
|
243 | (26) |
|
Adding a URL Desktop Shortcut to the Corporate Web Site |
|
|
244 | (6) |
|
Working with Special Folders |
|
|
244 | (3) |
|
Working with the WshUrlShortcut Object |
|
|
247 | (1) |
|
Developing the Desktop URL VBScript |
|
|
248 | (2) |
|
Understanding the Windows Registry |
|
|
250 | (9) |
|
Working with the Registry |
|
|
251 | (1) |
|
Understanding How the Registry Is Organized |
|
|
252 | (2) |
|
|
254 | (2) |
|
Writing VBScripts That Programmatically Interact with the Windows Registry |
|
|
256 | (1) |
|
Reading Registry Keys and Values |
|
|
256 | (1) |
|
Adding or Changing Registry Keys and Values |
|
|
257 | (1) |
|
Deleting Registry Keys and Values |
|
|
258 | (1) |
|
Customizing Desktop Wallpaper and Screen Saver Settings |
|
|
259 | (8) |
|
The Initialization Section |
|
|
259 | (1) |
|
The Main Processing Section |
|
|
260 | (1) |
|
The CopyCorpLogo() Subroutine |
|
|
261 | (1) |
|
The GetConfirmation() Function |
|
|
261 | (1) |
|
The SetBackground() Subroutine |
|
|
262 | (1) |
|
The SetScreenSaver() Subroutine |
|
|
263 | (1) |
|
The ForceLogoff() Subroutine |
|
|
264 | (1) |
|
The Fully Assembled Script |
|
|
265 | (2) |
|
|
267 | (2) |
|
Customizing the Start Menu and Quick Launch Toolbar |
|
|
269 | (22) |
|
|
270 | (3) |
|
Working with the WshShortcut Object |
|
|
273 | (7) |
|
A Desktop Shortcut Example |
|
|
274 | (1) |
|
Modifying Shortcut Properties |
|
|
275 | (5) |
|
Creating a Standard Applications Folder |
|
|
280 | (4) |
|
Scripting Folder Creation |
|
|
281 | (1) |
|
Saving a Shortcut to a Windows Folder |
|
|
281 | (1) |
|
Creating and Populating the Standard Applications Folder |
|
|
281 | (3) |
|
Configuring the Start Menu and Quick Launch Toolbar |
|
|
284 | (6) |
|
Adding a Link to the Programs Folder |
|
|
285 | (3) |
|
Adding Shortcuts to the Quick Launch Toolbar |
|
|
288 | (2) |
|
|
290 | (1) |
|
Scheduling Disk Maintenance |
|
|
291 | (22) |
|
Working with the Windows Command Prompt |
|
|
292 | (2) |
|
Disk Management Utilities and Command-Line Utilities |
|
|
294 | (9) |
|
Examining the Manual Disk Cleanup Process |
|
|
294 | (2) |
|
|
296 | (1) |
|
Creating the Cleanup Script |
|
|
297 | (2) |
|
Examining the Manual Disk Defrag Process |
|
|
299 | (1) |
|
Running the Disk Defragmenter Utility |
|
|
300 | (1) |
|
|
301 | (1) |
|
Creating the Defrag Script |
|
|
301 | (2) |
|
Scheduling Script Execution |
|
|
303 | (5) |
|
Working with the Scheduled Task Wizard |
|
|
304 | (2) |
|
Using the Windows at Command |
|
|
306 | (2) |
|
Creating a Scheduler Script |
|
|
308 | (3) |
|
Configuring the Task Scheduler Service |
|
|
309 | (2) |
|
|
311 | (2) |
|
Mapping Network Printers and Disks |
|
|
313 | (24) |
|
|
314 | (2) |
|
Working with the WshNetwork Object |
|
|
316 | (2) |
|
Accessing WshNetwork Properties |
|
|
317 | (1) |
|
Working with Network Drives |
|
|
318 | (3) |
|
Enumerating Network Drives |
|
|
318 | (1) |
|
|
319 | (1) |
|
Disconnecting a Network Drive |
|
|
320 | (1) |
|
Working with Network Printers |
|
|
321 | (5) |
|
Enumerating Network Printers |
|
|
322 | (1) |
|
Setting Up a Network Printer Connection |
|
|
323 | (1) |
|
Using the AddPrinterConnection() Method |
|
|
323 | (1) |
|
Using the AddWindowsPrinterConnection() Method |
|
|
324 | (1) |
|
Removing a Network Printer Connection |
|
|
325 | (1) |
|
Establishing a Default Printer |
|
|
326 | (1) |
|
|
326 | (7) |
|
The Initialization Section |
|
|
326 | (1) |
|
The Main Processing Section |
|
|
327 | (1) |
|
The DisplayNetworkData() Subroutine |
|
|
328 | (1) |
|
The MapNetworkDrive() Subroutine |
|
|
329 | (1) |
|
The SetupPrinterConnection() Subroutine |
|
|
329 | (1) |
|
The SetDefaultPrinter() Subroutine |
|
|
330 | (1) |
|
The Fully Assembled Script |
|
|
330 | (3) |
|
|
333 | (4) |
|
Creating Administrator Accounts |
|
|
337 | (24) |
|
Creating a Local Administrator Account |
|
|
338 | (6) |
|
Options for Manually Creating New User Accounts |
|
|
339 | (1) |
|
Using the Local User and Groups Snap-In |
|
|
339 | (5) |
|
|
344 | (4) |
|
|
345 | (1) |
|
|
346 | (2) |
|
|
348 | (7) |
|
The Initialization Section |
|
|
348 | (2) |
|
The Main Processing Section |
|
|
350 | (1) |
|
The CallRun Verification() Function |
|
|
350 | (2) |
|
The CreateAdminAcct() Subroutine |
|
|
352 | (2) |
|
The GetValidPasswd() Function |
|
|
354 | (1) |
|
The Fully Assembled Script |
|
|
355 | (4) |
|
|
359 | (2) |
|
PART III PROFESSIONAL PROJECT 2 |
|
|
361 | (2) |
|
Project 2: Analyzing Application Logs |
|
|
363 | (106) |
|
|
364 | (1) |
|
Project Case Study: Analyzing Application Logs |
|
|
365 | (14) |
|
|
366 | (6) |
|
Analyzing the In-House Application Logs |
|
|
367 | (1) |
|
|
368 | (1) |
|
Examining the Daily Sales Report |
|
|
369 | (1) |
|
Examining the Daily Returns Report |
|
|
370 | (1) |
|
Examining the Daily Production Report |
|
|
371 | (1) |
|
|
372 | (1) |
|
Performing a High-Level Design |
|
|
372 | (5) |
|
Developing and Processing the INI Configuration File |
|
|
373 | (1) |
|
Creating Log and Report Analyzers |
|
|
374 | (2) |
|
Scheduling the Execution of the Analyzer Scripts |
|
|
376 | (1) |
|
Creating a Report and Log Archive |
|
|
377 | (1) |
|
|
377 | (2) |
|
Using Configuration Files to Control Script Execution |
|
|
379 | (18) |
|
Creating a Configuration File to Control Script Execution |
|
|
380 | (3) |
|
|
381 | (1) |
|
|
382 | (1) |
|
Designing the Report and Log Analyzer INI File |
|
|
383 | (3) |
|
Creating an INI File Processing Procedure |
|
|
386 | (10) |
|
Verifying Whether the INI File Exists |
|
|
387 | (1) |
|
|
388 | (2) |
|
|
390 | (1) |
|
Determining Whether a File Contains Any Data |
|
|
391 | (1) |
|
Reading the Entire INI File |
|
|
392 | (1) |
|
Reading a Section of an INI File |
|
|
393 | (3) |
|
|
396 | (1) |
|
Developing Script Log Analyzers |
|
|
397 | (40) |
|
Reading Report and Log Files |
|
|
398 | (1) |
|
|
399 | (1) |
|
Creating the Error Log Analyzer |
|
|
400 | (10) |
|
The Initialization Section |
|
|
401 | (1) |
|
The Main Processing Section |
|
|
402 | (1) |
|
The SetUpDefaults() Subroutine |
|
|
403 | (1) |
|
The ProcessIniFile() Subroutine |
|
|
404 | (2) |
|
The RefineOutputFileName() Subroutine |
|
|
406 | (1) |
|
The ProcessReportFile() Subroutine |
|
|
407 | (1) |
|
The RecordSummaryData() Subroutine |
|
|
408 | (2) |
|
The WriteToEventLog() Subroutine |
|
|
410 | (1) |
|
Creating the Daily Sales Report Analyzer |
|
|
410 | (8) |
|
Creating the Daily Returns Report Analyzer |
|
|
418 | (8) |
|
Creating the Daily Production Report Analyzer |
|
|
426 | (8) |
|
Examining the Order/Inventory Summary Report |
|
|
434 | (2) |
|
|
436 | (1) |
|
Scheduling Script Execution |
|
|
437 | (16) |
|
Examining Scheduling VBScript Options |
|
|
438 | (5) |
|
Creating a Scheduled Task for Each Script |
|
|
438 | (1) |
|
Creating an Intermediary Scheduling Script |
|
|
439 | (1) |
|
Using the WshShell Object's Run() Method |
|
|
440 | (1) |
|
|
441 | (1) |
|
Monitoring Background Processes |
|
|
442 | (1) |
|
Setting Up an Intermediary Scheduling Script |
|
|
443 | (5) |
|
Creating Logic to Limit When the Script Can Execute |
|
|
443 | (1) |
|
Writing the MstrSched.vbs Script |
|
|
444 | (1) |
|
The Initialization Section |
|
|
445 | (1) |
|
The Main Processing Section |
|
|
445 | (1) |
|
The RunScript() Subroutine |
|
|
446 | (1) |
|
The WriteToEventLog() Subroutine |
|
|
446 | (1) |
|
The Fully Assembled Script |
|
|
447 | (1) |
|
Setting Up a Daily Automated Script Execution Schedule |
|
|
448 | (4) |
|
|
452 | (1) |
|
Maintaining a 30-Day Summary Log Archive |
|
|
453 | (16) |
|
Managing Files with VBScript |
|
|
454 | (4) |
|
Using the FileSystemObject |
|
|
454 | (2) |
|
|
456 | (2) |
|
Other VBScript Language Elements Needed to Build the Archive Management Script |
|
|
458 | (3) |
|
The WshShell Object's LogEvent() Method |
|
|
458 | (2) |
|
The Built-in VBScript Instr() Function |
|
|
460 | (1) |
|
Writing the Archive Management Script |
|
|
461 | (7) |
|
The Initialization Section |
|
|
461 | (1) |
|
The Main Processing Section |
|
|
461 | (1) |
|
The OkToRunToday() Subroutine |
|
|
462 | (1) |
|
The MonthToDelete() Subroutine |
|
|
463 | (1) |
|
The RemoveOldSummaryFiles() Subroutine |
|
|
464 | (1) |
|
The WriteToEventLog() Subroutine |
|
|
465 | (1) |
|
The Fully Assembled Script |
|
|
465 | (3) |
|
|
468 | (1) |
|
PART IV PROFESSIONAL PROJECT 3 |
|
|
469 | (2) |
|
Project 3: Creating a Centralized Report Management Station |
|
|
471 | (142) |
|
|
472 | (1) |
|
Project Case Study: Creating a Centralized Report Management Station |
|
|
473 | (12) |
|
|
474 | (4) |
|
Collecting Project Requirements |
|
|
475 | (3) |
|
|
478 | (1) |
|
Performing a High-Level Design |
|
|
478 | (6) |
|
Creating the Registry Setup Script |
|
|
480 | (2) |
|
Creating the Remote Summary Report Retrieval Script |
|
|
482 | (1) |
|
Creating the Report Consolidation Script |
|
|
482 | (1) |
|
Creating the Archive Management Script |
|
|
483 | (1) |
|
|
484 | (1) |
|
Developing a Setup Script |
|
|
485 | (22) |
|
Working with the Windows Registry |
|
|
486 | (4) |
|
Examining the Registry Root Keys |
|
|
487 | (1) |
|
Understanding How Data Is Stored |
|
|
487 | (1) |
|
Manually Accessing Registry Data |
|
|
488 | (2) |
|
Using VBScript and the WSH to Programmatically Modify the Registry |
|
|
490 | (9) |
|
Using the RegWrite() Method |
|
|
490 | (3) |
|
Using the RegRead() Method |
|
|
493 | (2) |
|
Using the RegDelete() Method |
|
|
495 | (1) |
|
Guarding against Registry Errors |
|
|
495 | (4) |
|
Creating the Setup Script |
|
|
499 | (6) |
|
The Initialization Section |
|
|
500 | (1) |
|
The Main Processing Section |
|
|
500 | (1) |
|
The GetPermissionToRun() Function |
|
|
501 | (1) |
|
The CreateRegistryEntries() Subroutine |
|
|
502 | (1) |
|
The Fully Assembled Script |
|
|
502 | (3) |
|
|
505 | (2) |
|
Collecting Remote Summary Reports |
|
|
507 | (30) |
|
|
508 | (4) |
|
Creating a System Account |
|
|
508 | (1) |
|
Creating the Scheduler Script |
|
|
509 | (1) |
|
Creating the Network Folders |
|
|
510 | (2) |
|
Setting Up Connections to Network Drives and Folders |
|
|
512 | (4) |
|
Manually Setting Up Connections |
|
|
512 | (2) |
|
Working with the WshNetwork Object |
|
|
514 | (1) |
|
Mapping Drive Connections |
|
|
515 | (1) |
|
Disconnecting Drive Connections |
|
|
515 | (1) |
|
|
516 | (2) |
|
Working with the FileSystemObject Object |
|
|
516 | (1) |
|
Working with the File Object |
|
|
517 | (1) |
|
Developing the Report Collection Script |
|
|
518 | (17) |
|
The Initialization Section |
|
|
518 | (1) |
|
The Main Processing Section |
|
|
518 | (2) |
|
The SetDefaultSettings() Subroutine |
|
|
520 | (1) |
|
The GetRegistrySettings() Subroutine |
|
|
520 | (3) |
|
The MapNetworkDrive() Function |
|
|
523 | (1) |
|
The GetSummaryRptFileName() Function |
|
|
524 | (1) |
|
The CopyFolders() Subroutine |
|
|
525 | (1) |
|
The DisconnectNetworkDrive() Subroutine |
|
|
526 | (1) |
|
The WriteToEventLog() Subroutine |
|
|
527 | (1) |
|
The TerminateScript() Subroutine |
|
|
527 | (1) |
|
The Fully Assembled Script |
|
|
528 | (7) |
|
|
535 | (2) |
|
Processing and Consolidating Report Data |
|
|
537 | (52) |
|
|
538 | (2) |
|
|
538 | (1) |
|
Removing Leading and Trailing Spaces |
|
|
539 | (1) |
|
Converting a String to an Integer |
|
|
539 | (1) |
|
Determining a String's Length |
|
|
540 | (1) |
|
|
540 | (1) |
|
Working with the Word Object Model |
|
|
540 | (3) |
|
Developing a Network Messaging Procedure |
|
|
543 | (1) |
|
Creating the Consolidation Report Script |
|
|
544 | (43) |
|
The Initialization Section |
|
|
545 | (1) |
|
The Main Processing Section |
|
|
545 | (2) |
|
The SetDefaultSettings() Subroutine |
|
|
547 | (1) |
|
The GetRegistrySettings() Subroutine |
|
|
547 | (3) |
|
The IdentifyRptsToProcess() Subroutine |
|
|
550 | (1) |
|
The ReadSummaryReport() Subroutine |
|
|
551 | (1) |
|
The CreateConsolidatedTextReport() Subroutine |
|
|
552 | (10) |
|
The CreateConsolidatedWordReport() Subroutine |
|
|
562 | (3) |
|
The NotifyOperationsStaff() Subroutine |
|
|
565 | (1) |
|
The WriteToEventLog() Subroutine |
|
|
566 | (1) |
|
The TerminateScript() Subroutine |
|
|
566 | (1) |
|
The Fully Assembled Script |
|
|
566 | (21) |
|
|
587 | (2) |
|
|
589 | (24) |
|
Administering Report Files |
|
|
590 | (1) |
|
Working with Windows Folders and Files |
|
|
591 | (3) |
|
Determining Whether or Not a Folder Exists |
|
|
592 | (1) |
|
|
592 | (2) |
|
Moving Files between Staging and Archive Folders |
|
|
594 | (1) |
|
Developing the Archive Management Script |
|
|
594 | (18) |
|
The Initialization Section |
|
|
595 | (1) |
|
The Main Processing Section |
|
|
595 | (2) |
|
The OkToRunToday() Subroutine |
|
|
597 | (1) |
|
The SetDefaultSettings() Subroutine |
|
|
597 | (1) |
|
The GetRegistrySettings() Subroutine |
|
|
598 | (2) |
|
The MoveSummaryReports() Subroutine |
|
|
600 | (2) |
|
The MonthToDelete() Subroutine |
|
|
602 | (1) |
|
The RemoveOldReportFiles() Subroutine |
|
|
603 | (2) |
|
The WriteToEventLog() Subroutine |
|
|
605 | (1) |
|
The TerminateScript() Subroutine |
|
|
605 | (1) |
|
The Fully Assembled Script |
|
|
605 | (7) |
|
|
612 | (1) |
|
PART V PROFESSIONAL PROJECT 4 |
|
|
613 | (2) |
|
Project 4: Reporting Application Summary Data via the Web |
|
|
615 | (176) |
|
|
616 | (1) |
|
Reporting Application Summary Data via the Web |
|
|
617 | (16) |
|
|
618 | (2) |
|
Collecting Project Requirements |
|
|
619 | (1) |
|
Documenting Project Requirements |
|
|
620 | (1) |
|
Performing a High-Level Design |
|
|
620 | (12) |
|
Accomplishing Prerequisite Tasks |
|
|
624 | (5) |
|
|
629 | (1) |
|
|
629 | (1) |
|
Creating the Registration and Configuration Page |
|
|
630 | (1) |
|
Converting Consolidated Summary Reports to HTML Pages |
|
|
630 | (1) |
|
Building the Report Archive Page |
|
|
631 | (1) |
|
Distributing HTML and Word Files and Performing Archive Management |
|
|
631 | (1) |
|
|
632 | (1) |
|
|
633 | (12) |
|
A Quick Overview of the Order/Inventory Reporting Web Site |
|
|
634 | (1) |
|
|
635 | (5) |
|
|
636 | (1) |
|
Defining the Welcome Page |
|
|
637 | (2) |
|
|
639 | (1) |
|
The Daily Consolidated Summary Report Page |
|
|
640 | (1) |
|
|
640 | (1) |
|
The Registration and Configuration Settings Page |
|
|
641 | (2) |
|
|
643 | (2) |
|
Building the Web Site's Main Page |
|
|
645 | (24) |
|
|
646 | (1) |
|
Building the Links.html Page |
|
|
647 | (8) |
|
HTML for the Links.html Page |
|
|
647 | (1) |
|
Adding VBScript to the HTML Page |
|
|
648 | (1) |
|
Setting the Default Background Color |
|
|
648 | (2) |
|
Creating Link Rollover Effects |
|
|
650 | (1) |
|
Posting Messages on the Internet Explorer Status Bar |
|
|
651 | (1) |
|
Using VBScript to Control Frame Content |
|
|
651 | (2) |
|
The Fully Assembled Links.html Page |
|
|
653 | (2) |
|
Building the Welcome.html Page |
|
|
655 | (10) |
|
HTML for the Welcome.html Page |
|
|
656 | (1) |
|
Redirection for Unsupported Browsers |
|
|
657 | (3) |
|
Retrieving a VBScript Cookie |
|
|
660 | (2) |
|
The Fully Assembled Welcome.html Page |
|
|
662 | (3) |
|
Creating the Browser.html Page |
|
|
665 | (2) |
|
|
667 | (2) |
|
Building the Registration and Configuration Settings Page |
|
|
669 | (22) |
|
|
670 | (7) |
|
|
671 | (2) |
|
|
673 | (1) |
|
|
673 | (1) |
|
Creating and Retrieving a Simple Cookie |
|
|
673 | (1) |
|
Creating Persistent Cookies |
|
|
674 | (1) |
|
Specifying Valid Host Names |
|
|
675 | (1) |
|
Determining Which Folders Have Cookie Access |
|
|
676 | (1) |
|
Requiring Secure Cookie Access |
|
|
676 | (1) |
|
|
677 | (1) |
|
Verifying Your Cookie's Creation |
|
|
677 | (1) |
|
Collecting Information Using HTML Forms |
|
|
677 | (9) |
|
HTML for the Config.html Page |
|
|
678 | (2) |
|
Using VBScript to Process Form Contents |
|
|
680 | (1) |
|
|
681 | (2) |
|
|
683 | (1) |
|
Formatting a Cookie Expiration Date |
|
|
684 | (1) |
|
Canceling a Change to Configuration Settings |
|
|
684 | (1) |
|
|
684 | (2) |
|
The Fully Assembled Welcome.html Page |
|
|
686 | (3) |
|
|
689 | (2) |
|
Converting Reports to HTML Pages |
|
|
691 | (38) |
|
Preparing to Create the HTML Conversion Script |
|
|
692 | (1) |
|
Creating the HTML Conversion Script |
|
|
693 | (16) |
|
The Initialization Section |
|
|
694 | (1) |
|
The Main Processing Section |
|
|
694 | (6) |
|
The GetRegistrySettings() Subroutine |
|
|
700 | (2) |
|
The AssembleFileNames() Subroutine |
|
|
702 | (1) |
|
The WriteHeader() Subroutine |
|
|
702 | (1) |
|
The BeginTableDefinition() Subroutine |
|
|
703 | (1) |
|
The WriteTableHeader() Subroutine |
|
|
703 | (1) |
|
The WriteTableSubHeader() Subroutine |
|
|
703 | (1) |
|
The WriteErrorsColHeadings() Subroutine |
|
|
704 | (1) |
|
The WriteErrorsData() Subroutine |
|
|
704 | (1) |
|
The WriteSalesAndReturnsColHeadings() Subroutine |
|
|
705 | (1) |
|
The WriteProductionColHeadings() Subroutine |
|
|
705 | (1) |
|
The WriteSalesAndReturnsData() Subroutine |
|
|
705 | (1) |
|
The WriteProductionData() Subroutine |
|
|
706 | (1) |
|
The EndTableDefinition() Subroutine |
|
|
706 | (1) |
|
The WriteFooter() Subroutine |
|
|
706 | (1) |
|
The ParseProductionData() Subroutine |
|
|
706 | (2) |
|
The WriteToEventLog() Subroutine |
|
|
708 | (1) |
|
The TerminateScript() Subroutine |
|
|
708 | (1) |
|
The Fully Assembled Script |
|
|
709 | (11) |
|
The Automatically Generated HTML Page |
|
|
720 | (8) |
|
|
728 | (1) |
|
Building the Report Archive Page |
|
|
729 | (26) |
|
Working with the Folder Object and the Files Collection |
|
|
730 | (2) |
|
Assembling the Report Archive Page |
|
|
732 | (21) |
|
The Initialization Section |
|
|
732 | (1) |
|
The Main Processing Section |
|
|
733 | (3) |
|
The GetRegistrySettings() Subroutine |
|
|
736 | (2) |
|
The WriteHeader() Subroutine |
|
|
738 | (1) |
|
The WriteH3Heading() Subroutine |
|
|
738 | (1) |
|
The WriteFooter() Subroutine |
|
|
739 | (1) |
|
The MapNetworkDrive() Function |
|
|
739 | (1) |
|
The DisconnectNetworkDrive() Subroutine |
|
|
740 | (1) |
|
The WriteToEventLog() Subroutine |
|
|
741 | (1) |
|
The TerminateScript() Subroutine |
|
|
741 | (1) |
|
The Fully Assembled Script |
|
|
742 | (7) |
|
The Content of the HTML File |
|
|
749 | (4) |
|
|
753 | (2) |
|
Report Distribution and Remote Archive Management |
|
|
755 | (36) |
|
Implementing Remote Archive Management |
|
|
756 | (7) |
|
|
757 | (1) |
|
|
758 | (1) |
|
|
759 | (1) |
|
|
760 | (1) |
|
|
761 | (1) |
|
A Quick Remote WSH Example |
|
|
762 | (1) |
|
|
763 | (1) |
|
Creating the Final Script |
|
|
763 | (13) |
|
The Initialization Section |
|
|
764 | (1) |
|
The Main Processing Section |
|
|
764 | (2) |
|
The GetRegistrySettings() Subroutine |
|
|
766 | (3) |
|
The MapNetworkDrive() Function |
|
|
769 | (1) |
|
The GetFileNames() Subroutine |
|
|
770 | (1) |
|
The CopyAndMoveFiles() Subroutine |
|
|
770 | (3) |
|
The DisconnectNetworkDrive() Subroutine |
|
|
773 | (1) |
|
The TimeToCleanArchive() Function |
|
|
774 | (1) |
|
The RemoteScript_Start() Subroutine |
|
|
774 | (1) |
|
The RemoteScript_End() Subroutine |
|
|
775 | (1) |
|
The RemoteScript_Error() Subroutine |
|
|
775 | (1) |
|
The WriteToEventLog() Subroutine |
|
|
776 | (1) |
|
The TerminateScript() Subroutine |
|
|
776 | (1) |
|
The Fully Assembled Script |
|
|
776 | (11) |
|
Creating the Archive Maintenance Script |
|
|
787 | (1) |
|
|
788 | (3) |
|
|
791 | (112) |
|
Appendix A Windows XP Command Reference |
|
|
793 | (106) |
|
Appendix B What's on the Companion Web Site |
|
|
899 | (4) |
Index |
|
903 | |