|
Guy recommends :
Find out which of your VMs are a waste of space and which VMs need more resources.
Guy's Review of
1) FreePing
|
Troubleshooting System Error CodesTroubleshooting System Error Codes 800 xxxxxSeven strategies for solving VBScript problems which generate error codes beginning with 800 ..... ‡ 1) Golden Rule - Break your script into sectionsWhen I get a request for assistance with a VBScript, I often reply with the sentence: 'Breakdown your script into its simplest components, get each command working in isolation, only then bolt the sections back together'. In my own scripts you may see traces of troubleshooting sections in the form of extra WSCript.echo messages. Sometimes I forget to remove them after testing the script, on other occasions I deliberately leave the WSCript.echo statement, just to alert you that VBScript has performed an action. The reason this strategy works is because you simultaneously build on success while narrowing down the search area for the fault. 2) Play the numbers game.Start solving VBScript errors by playing the numbers game. Rule 1) Trace the line numbers of the error. While you play the numbers game, pretend you are Sherlock Holmes searching for clues. Look for patterns. Take these two error messages 800708CA and 800A01F4; with just a glance at 800708CA I can tell this is an operating system problem, the clue is that '7' in position 4. Notice how in the second hex number, 800708CA, we have an 'A' in position 4, thus indicating a syntax error. Further research indicates 800708CA means network connection does not exist, whereas 0800A01F4 means variable undefined. Incidentally, the underlying problem was trying to remove a network drive that did not exist. Get a good script editor. When you are troubleshooting, you need every advantage that you can get, thus a script editor will help by displaying the line numbers. The advantage is that when get a WSH error message you won't have to count down to line 81 or where ever the message directs you. The better script editors also color code the commands, as a result you can often see a sudden change to red letters where you make a typo. As a bonus good script editors give you a context sensitive library of commands, which extends your scripting vocabulary. These days, my choice of script editor is OnScript. 3) Try a Walk-ThroughIt is amazing how often a manual walk-though of the task sheds extra light on a scripting problem. In particular, watch out for steps that are missing in the script. For example, pressing the OK button in a dialog box requires the VBScript command: obj.SetInfo. Following this theme, as you step through the task manually, observe how the default radio buttons are set. Another advantage of a walk-through is that may reveal that what you want to achieve cannot be done with a VBScript. Trust me, I have a whole folder full of readers' plans for mission impossible. Many plans sound plausible until you try a walk-through. For example, I had a request to add a photograph to each user's property sheet. Could I kindly help with a script. It seemed a nice idea until a walk-through in Active Directory Users and Computers exposed that there is no way of adding a user's photograph. It also struck me that even if the script could magically achieve the mission, then how would you see the photo? 4) If you are still stuck try a parallel approach4a) Suppose that your mission is to map a network drive, but the script just won't work. Instead of going around in circles, try mapping a printer. If that also fails, look for a common cause, for instance, the fault maybe because you are created an environmental object instead of a network object. By trying a parallel approach you can isolate the error. 4b) Here is another example, you are trying write to a file; but it fails, why not try to read from a file instead? This will prompt you to re-examine the Const statement and also to check that folder\file referenced in the script, is where you think it is. 4c) Cannot run Excel? Try to run Notepad instead, if that works it could mean that Excel is not installed. 4d) Seek similar examples on the internet. Leave a request in your favourite forum. My hidden message with this approach is when the parallel command works, you are at the start of a winning roll of the VBScript dice. What I find is that when I get even a small success, then my confidence grows and what was a difficult problem, suddenly becomes a cinch. Don't underestimate the power of positive thinking.
|
||||
Custom Search
|
|
|
Home Copyright © 1999-2012 Computer Performance LTD All rights reserved Please report a broken link, or an error. | |