did-you-know? rent-now

Rent More, Save More! Use code: ECRENTAL

did-you-know? rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9781592007318

Microsoft Wsh And Vbscript Programming For The Absolute Beginner

by
  • ISBN13:

    9781592007318

  • ISBN10:

    1592007317

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2005-02-18
  • Publisher: Cengage Learning PTR
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $24.00 Save up to $0.12
  • Buy New
    $23.88

    USUALLY SHIPS IN 24-48 HOURS

Summary

If you are new to programming with Microsoft WSH and VBScript and are looking for a solid introduction, this is the book for you. Developed by computer science professors, books in the for the absolute beginner series teach the principles of programming through simple game creation. You will acquire the skills that you need for more practical WSH and VBScript programming applications and will learn how these skills can be put to use in real-world scenarios. Best of all, by the time you finish this book, you will be able to apply the basic principles you've learned to the next programming language you tackle.

Author Biography

Jerry Lee Ford, Jr. is an author, educator, and IT professional with more than 16 years' experience in information technology, including roles as an automation analyst, technical manager, technical support analyst, and security analyst

Table of Contents

Introduction xv
PART I Introducing the WSH and VBScript
1(62)
Getting Started with the Wsh and Vbscript
3(32)
Project Preview: The Knock Knock Game
4(1)
What Is the WSH?
5(14)
WSH Scripting Engines
6(1)
Selecting a WSH Script Execution Host
6(1)
Introducing the WSH Core Object Model
7(1)
How Does the WSH Compare to Windows Shell Scripting?
8(1)
Understanding How the Windows Shell Works
9(3)
How Does It All Work?
12(1)
Operating System Compatibility
13(1)
How Do You Install It?
14(1)
How Does It Work with VBScript?
14(4)
What Other Scripting Languages Does the WSH Support?
18(1)
Introducing VBScript
19(7)
VBScript Capabilities
20(1)
VBScript's Roots
21(1)
VBScript's Cousins: Visual Basic and VBA
22(4)
Microsoft Scripting Technologies Web Page
26(2)
Back to the Knock Knock Game
28(5)
Designing the Game
28(4)
The Final Result
32(1)
Summary
33(2)
Overview of the Windows Script Host
35(28)
Project Preview: The Rock, Paper, and Scissors Game
36(1)
A Detailed Examination of WSH Components
36(15)
The Core Object Model
37(2)
WSH Objects and Their Properties and Methods
39(12)
Configuring WSH Execution Hosts
51(7)
Configuring WScript and CScript Command-Line Execution
51(2)
Configuring WScript Desktop Execution
53(1)
Overriding Command-Line Host Execution Settings
54(2)
Customizing WScript Settings for Individual Desktop Scripts
56(2)
Back to the Rock, Paper, and Scissors Game
58(4)
Designing the Game
58(3)
The Final Result
61(1)
Summary
62(1)
PART II Learning VBScript & WSH Scripting
63(168)
VBScript Basics
65(36)
Project Preview: The Math Game
66(2)
VBScript Statements
68(1)
VBScript Syntax Rules
68(5)
Reserved Characters
70(1)
Adding Comments
70(3)
Mastering the VBScript Object Model
73(1)
Working with VBScript Run-Time Objects
74(5)
Properties
75(2)
Methods
77(2)
Using VBScript Run-Time Objects in Your Scripts
79(2)
Examining Built-in VBScript Functions
81(2)
Demo: The Square Root Calculator
81(1)
Demo: A New and Improved Square Root Calculator
82(1)
Displaying Script Output
83(6)
The WScript's Echo() Method
84(1)
The WshShell Object's Popup() Method
84(2)
The VBScript InputBox() Function
86(1)
The VBScript MsgBox() Function
87(2)
Back to the Math Game
89(10)
A Quick Overview of the WshShell SendKeys() Method
89(3)
Designing the Game
92(4)
The Final Result
96(3)
Summary
99(2)
Constants, Variables, and Arrays
101(44)
Project Preview: The Story of Captain Adventure
101(2)
Understanding How Scripts View Data
103(1)
Working with Data That Never Changes
104(7)
Assigning Data to Constants
104(3)
VBScript Run-Time Constants
107(4)
Storing Data That Changes During Script Execution
111(13)
VBScript Data Types
111(1)
Defining Variables
112(3)
Variable Naming Rules
115(1)
Variable Scope
116(1)
Modifying Variable Values with Expressions
117(4)
Using the WSH to Work with Environment Variables
121(3)
Working with Collections of Related Data
124(11)
Single-Dimension Arrays
125(1)
Multiple-Dimension Arrays
126(1)
Processing Array Contents
127(2)
Getting a Handle on the Size of Your Arrays
129(1)
Resizing Arrays
130(3)
Building Dynamic Arrays
133(2)
Erasing Arrays
135(1)
Processing Data Passed to a Script at Run-Time
135(2)
Passing Arguments to Scripts
135(1)
Designing Scripts That Accept Argument Input
136(1)
Back to the Story of Captain Adventure
137(7)
Designing the Game
138(4)
The Final Result
142(2)
Summary
144(1)
Conditional Logic
145(28)
Project Preview: The Star Trek Quiz Game
145(2)
Examining Program Data
147(14)
The If Statement
148(10)
The Select Case Statement
158(3)
Performing More Complex Tests with VBScript Operators
161(1)
Back to the Star Trek Quiz Game
162(10)
Game Development
163(6)
The Fully Assembled Script
169(3)
Summary
172(1)
Processing Collections of Data
173(30)
Project Preview: The Guess a Number Game
173(2)
Adding Looping Logic to Scripts
175(10)
The For . . . Next Statement
175(3)
The For Each . . . Next Statement
178(2)
Do . . . While
180(3)
Do . . . Until
183(1)
While . . . Wend
184(1)
Back to the Guess a Number Game
185(16)
Designing the Game
185(4)
The Final Result
189(2)
Creating Shortcuts for Your Game
191(9)
A Complete Shortcut Script
200(1)
Summary
201(2)
Using Procedures to Organize Scripts
203(28)
Project Preview: The BlackJack Lite Game
203(2)
Improving Script Design with Procedures
205(9)
Introducing Subroutines
206(1)
Creating Custom Functions
207(1)
Improving Script Manageability
208(1)
Writing Reusable Code
209(1)
The Guess a Number Game Revisited
210(4)
Working with Built-In VBScript Functions
214(1)
Limiting Variables Scope with Procedures
214(2)
Back to the BlackJack Lite Game
216(14)
Designing the Game
216(9)
The Final Result
225(5)
Summary
230(1)
PART III Advanced Topics
231(200)
Storing and Retrieving Data
233(44)
Project Preview: The Lucky Lottery Number Picker
233(2)
Working with the Windows File System
235(3)
Opening and Closing Files
238(4)
Writing to Files
242(3)
Writing Characters
242(1)
Writing Lines
243(1)
Adding Blank Lines
244(1)
Reading from Files
245(3)
Skipping Lines
246(1)
Reading Files Character by Character
247(1)
Reading a File All at Once
247(1)
Managing Files and Folders
248(6)
Copying, Moving, and Deleting Files
249(1)
Copying One or More Files
250(1)
Moving One or More Files
250(1)
Deleting One or More Files
251(1)
Creating a New Folder
251(1)
Copying Folders
251(1)
Moving Folders
252(1)
Deleting Folders
252(2)
Storing Script Configuration Settings in External Files
254(3)
INI File Structure
254(1)
A Working Example
254(3)
Back to the Lucky Lottery Number Picker
257(19)
Designing the Game
258(10)
The Final Result
268(8)
Summary
276(1)
Handling Script Errors
277(42)
Project Preview: The Hangman Game
277(2)
Understanding VBScript Errors
279(7)
Understanding Error Messages
280(1)
Fixing Syntax Errors
281(2)
Catching Run-Time Errors
283(2)
Preventing Logical Errors
285(1)
Dealing with Errors
286(5)
Letting Errors Happen
286(1)
Ignoring Errors
287(1)
Creating Error Handlers
288(3)
Reporting Errors
291(2)
Creating a Custom Log File
291(1)
Recording an Error Message in the Application Event Log
292(1)
Back to the Hangman Game
293(24)
Designing the Game
294(14)
The Final Result
308(9)
Summary
317(2)
Using the Windows Registry to Configure Script Settings
319(32)
Project Preview: Part 2 of the Hangman Game
319(2)
Introducing the Windows Registry
321(5)
How Is the Registry Organized?
322(1)
Understanding How Data Is Stored in the Registry
323(3)
Accessing Registry Keys and Values
326(1)
Creating a Key and Value to Store Script Settings
326(3)
Creating or Modifying Registry Keys and Values
326(1)
Accessing Information Stored in the Registry
327(1)
Deleting Keys and Values
327(1)
Retrieving System Information Stored in the Registry
327(2)
Back to Part 2 of the Hangman Game
329(20)
Creating the Setup Script
330(3)
Updating the Hangman Game
333(16)
Summary
349(2)
Working with Built-In Vbscript Objects
351(46)
Project Preview: The Tic-Tac-Toe Game
351(2)
Leveraging VBScript's Built-In Collection of Objects
353(3)
Built-In Object Properties
355(1)
Built-In Object Methods
355(1)
Creating Custom Objects
356(6)
Defining a Custom Object
356(1)
Defining Object Properties and Methods
357(1)
Creating Event Procedures
358(4)
Working with the Err Object
362(1)
Working with Regular Expressions
362(6)
Replacing Matching Patterns
363(3)
Testing for Matching Patterns
366(1)
Creating Matches Collections
367(1)
Back to the Tic-Tac-Toe Game
368(27)
Designing the Game
369(14)
The Final Result
383(12)
Summary
395(2)
Combining Different Scripting Languages
397(34)
Project Preview: The VBScript Game Console
397(2)
Introducing Windows Script Files
399(8)
Examining WSH Supported XML Tags
400(1)
Using the <?job?> Tag
400(1)
Using the <?XML?> Tag
401(1)
The <comment> </comment> Tags
402(1)
The <job> </job> Tags
402(2)
The <package> </package> Tags
404(1)
The <resource> </resource> Tags
405(1)
The <script> </script> Tags
405(2)
Executing Your Windows Script Files
407(1)
Back to the VBScript Game Console
407(23)
Designing the Game
407(1)
Using XML to Outline the Script's Structure
408(1)
Writing the First JScript
409(2)
Developing the VBScript Game Console
411(9)
Writing the Second JScript
420(1)
The Final Result
420(10)
Summary
430(1)
PART IV Appendices
431(2)
Appendix A WSH Administrative Scripting
433(34)
Desktop Administration
434(4)
Configuring the Desktop Background
434(2)
Configuring the Screen Saver
436(2)
Network Administration
438(3)
Mapping Network Drives
438(2)
Disconnecting Mapped Drives
440(1)
Printer Administration
441(3)
Connecting to a Network Printer
441(2)
Disconnecting from a Network Printer
443(1)
Computer Administration
444(4)
Managing Services
444(2)
User Account Administration
446(2)
Scheduling the Execution of Administrative Scripts
448(5)
The AT Command
448(2)
The Windows Scheduler
450(1)
Creating a Master Scheduling Script
451(2)
Disk Management
453(4)
Automating Disk Cleanup
453(2)
Automating the Disk Defrag Process
455(2)
Integrating VBScript with Other Applications
457(10)
Automating Microsoft Word Reports Generation
457(4)
Automating the Creation of Microsoft Excel Spreadsheets
461(3)
Automating the Execution of Third-Party Applications
464(3)
Appendix B Built-In VBScript Functions
467(6)
VBScript Functions
467(6)
Appendix C What's on the Companion Web Site?
473(8)
Script Examples
473(4)
VBScript Editors
477(4)
Adersoft VbsEdit
477(1)
VBSEditor
478(1)
SitePad Pro
479(2)
Appendix D What Next?
481(6)
Recommended Reading
481(1)
Locating WSH and VBScript Resources Online
482(5)
Index 487

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program