|
|
 |
 |
|
 |
|
Computer Book Store > Computer books beginning with M
|
Microsoft Windows Scripting Self-Paced Learning Guide (Pro-Other) |
Author: Ed Wilson
Published: 2004-04-07 |
List price: $44.99
Our price: $35.09
|
Usually ships in 24 hours
As of: September 09th, 2010 05:07:27 AM
|
|
|
Customer comments on this selection.
Avoid getting this book I should have paid attention to the negative reviews - yet there are not enough of them. This book is positively awful. It is hard to know where to begin. The degrees of awfulness should probably be divided between bad for people unfamiliar with programming and people familiar with programming.
Then, there is badness in how the book is structured and the information presented. Even the simplest of concepts are repetitively broken down into 4 parts. Before you buy, look at the on-line table of contents. The chapter headings of "Header Information," "Reference Information," Worker Information," and "Output Information" are repeated for practically every sub-chapter and every example in the book. These sections are not meaningful in terms of the information conveyed. If the author dealt with some of the concepts once and then dispensed with them, the book would have been more concise and perhaps easier to read.
Let me deal with one part, the "Header Information." In this, the author describes (every time, the two statements "Option Explicit" and "On Error Resume Next." How many times do we have to have mention of the same two statements? Especially if his recommendation of usage of the On Error statement is fatally flawed.
Look at this very simple example. The variable x is not defined, so the If test at best should fail, yet if you run this you will find that the code reflects the "True" condition. Notice that there may be many other reasons for the test to fail other than this failure to define the variables. Also, other important functions may not failed, that the code relies on, yet the author's recommendation will have the code executing as if nothing is amiss.
Option Explicit
On Error Resume Next
Dim a, b, c
a = "test pass"
b = "test fail"
If x = a then
wscript.Echo a
else
Wscript.Echo b
end if
A good example of this is when I tried running one of the early samples on my Vista machine and I simply got no output. It took me a good long while to figure out that the registry keys referenced in the sample did not exist in my registry and that every read to the registry failed.
There is a lack of reference information for the language itself. As an example, let me quote the 3 paragraphs where the intrinsic VBScript constants is discussed:
"You use the vbCrLf command to perform what is called a carriage return and line feed. vbCrLf is an intrinsic constant, which means that it is a constant that is built into VBScript. Since intrinsic constants are built into VBScript, you don't need to define them as you do regular constants. You'll use other intrinsic constants as you continue to develop VBScripts in later chapters.
vbCrLf has its roots in the old-fashioned manual typewriter. Those things had a handle on the end that rolled the platen up one or two lines (the line feed), and then repositioned the type head (the carriage return). Like the typewriter handle, the vbCrLf command positions the text to the first position on the following line. It's a very useful command for formatting text in both dialog boxes and text files. The last line in our If...Then construct is the End If command. End If tells VBScript that we're finished using the If...Then command. If you don't include End If, VBScript complains with an error.
After using End If, you have the Loop command on a line by itself. The Loop command belongs to the Do While construct that began the Worker and Output Information section. Loop sends the script execution back to the Do While line. VBScript continues to Loop through, reading the text file and looking for ' marks, as long as it doesn't reach the end of the text stream. When VBScript reaches the end of the text stream from the DisplayComputerNames script, you display a message that says you're finished processing the script. This is important, because otherwise there would be no indication that the script has concluded running. You then close your two files and the script is done. In reality, you don't need to close the files because they will automatically close once the script exits memory, but closing the files is good practice and could help to avoid problems if the script hangs."
Note how much of it is not a discussion of the vbCrLf constant or any other constant, for that matter, note that there is absolutely no mention of Appendix A where all the other intrinsic constants are listed and if you look in the Index of the book, there is no reference other than the reference to this section.
The first chapters are tough to get into, they spend a very long time on repetitive information that will not move you forward, as each sample introduces concepts that are not explained then, but postponed for explanation in later sections. So you work through these samples that does something, but does not explain the "something" in any great depth. This is why other books use the "Hello world" sample in early stages of introducing the language - you are not obscuring the language constructs with methods and objects that have not yet been introduced.
Then there are the quirky items that are unnecessary in a learning book, for instance, the author discusses documentation under the chapter heading "Docs that make house calls." How is that informative or meaningful?
Or, for instance this gem: "I've been calling this the Sleep command, but in programming speak it would be called the Sleep method of the WScript object. However, if I called it that, this book would sound like a programmer's reference and therefore would be boring. So I'll just call it the Sleep command and be done with it."
I can find no reason at all to recommend this book.
Self paced bad practices I got this as a freebie ebook when I bought the WMI scripting book.
What a total waste. I am new to Widows scripting but an old hack at *Nix shell scripting and perl. I needed to do some scripting for a client that doesn't have perl installed universally, but wants scripts to run universally on their windows servers.
I wasted a couple of days beating my head against the wall because I used this book. I finally bought "Windows 2000 Scripting Guide" and got my scripts working.
In addition to the complaints others have left indicating the the author does not explain the programming model, I found myself with a large hole in my foot because this author directed me to point a gun at my boot before pulling the trigger.
I used the sample scripts in the book as a starting point in my scripts, but unwittingly injected really bad practices into my programs.
The author states in Chapter 1:
"So 'On Error Resume Next' tells the computer that when something is messed up (causing an error), you want the computer to just skip that line and try the next line in the script. This process is called error handling,"
Actually, this is called ERROR HIDING (not handling) and it causes things that are messed up (causing an error) to be hidden from your view so you CAN'T find or fix them.
This is the worst bad practice that can be taught
Here is an example of how bad it is:
while using this directive your code that looks like:
IF condition THEN
positive_action
ELSE
negative_action
END IF
will, when an error is encountered in evaluating the condition, get transmogrified into simply:
positive_action
The "condition" that includes an error ALWAYS evaluates to true.
I can't think of a worse logic bomb to inject into your code or a better reason to skip this book.
Not a bad little intro I admit I avoided purchasing this book as I felt I was beyond it since I know Perl. I ran into it again when I purchased Microsoft Windows Administrator's Automation Toolkit (Pro-One-Offs). On the CD there is a e-book form of the book.
I figured why not read it? One possible drawback exists if you pick up the automation toolkit book. You will not get a copy of the scripts. It's not an issue if you don't mind typing. Which for me is better as making mistakes and debugging helped me more then simply watching a script run.
I noticed that the e-book might be an earlier version of the printed book as the scripting style changes for a copy of the scripts.
As to the claims of the scripts not working; I ran into that as well but they are easy to solve. Well except one. You look for computers in AD, the scripting didn't know how to handle a Linux Samba entry.
Overall the book is decent. I was looking for something to give me an introduction to vbscript. Something more then a beginning "howto" script book.
There is not much discussion about the WSH engine. However, for me that was not an issue as I am still in the beginning stages of vbscript. This might be more of an issue as I get more advanced. But, this will probably get solved by an advanced book or looking on the Net.
The book does some basic stuff in the beginning. Loops, if/then, Arrays. Part 2 of the book introduces basic administration. There you will be introduced to file system objects, WMI, and WMI queries. Part 3, takes more advanced administration issues with and introduction to LDAP, ADSI, Searching AD, Configuring Network components, logon scripts, working with registry, and working with printers. Part 4, deals with other apps such as IIS6 and exchange 2003.
The appendix has some info on ADSI, and WMI. It's ok if you are starting out but I think it will grow past it's usefulness.
The scripts in book are simple and straightforward. They don't have a great deal of intelligence built in to deal with unknowns. Probably, not needed as this is an introduction book.
Overall I am happy with the book. It gave me an idea as to some possibilities and it helped me understand better on where to look for stuff.
Fast Paced Learning Tool I use the book all the time to help groups of customers learn scripting. It jumps into useful examples early in the book. You build on those examples until you get to the point where you are combining the technologies to build useful scripts, like using Active Directory to create a list of computers which you then analyze and configure using Windows Management Instrumentation ( set of extensions to the Windows Driver Model that provides an operating system interface through which instrumented components can provide information and notification ). If you read only to chapter 15 you get a solid background of how WMI exposes a collection of COM scriptable objects that allow various applications to take advantage of the management information, including information about how Active Directory can be manipulated with VB Script.
Excellent Book I've found this book with excellent content and very helpful for my clients ( I Work in a Technical Support Group for VIP Customers). The author drives you through with very clear language and at the same time funny and keeps you hooked to it.
Highly Recommended! Specially for those deep into Thechnical stuff.
|
Similar Listings
|
|
Our Computer book picks:
|
|
Search the Computer Products Store
LCS Amazon Store 3.0 © 2010
|
|
|
|
|
|
|