Introduction to VBScript Troubleshooting
Practical Advice
- Your first thought should be: 'Is this VBScript error a syntax
problem or there a fault with the
logic?'
- Make sure that the file extension is .vbs and not .txt.
- Print out the VBScript and go through it line by line.
- Check your ' Rem lines
- Compare with a similar script that does work.
- Try running the VBScript on the server rather than a workstation.
- Try 'Option Explicit'
and make sure you have declared your variables.
- Experiment with adding
Error Handling code.
- Beware running a script which creates 'Objects' for a second time.
It that's your problem you are
likely to get a WSH message: Code 80071329
- Object Already Exists
- If you get a different 800xxxxx then
check here
Positive Thinking - Get into 'State'
Firstly, and most importantly, believe that you can solve this
problem! Guy says, 'You will beat this VBScript problem'. So take 5
seconds to get into 'state'. Visualise another script problem you solved,
remember the elation you felt when beat it.
A well defined problem really is half the solution. Something magical
happens when you write down precisely what is wrong. Just collecting the
symptoms triggers your brain to start searching for causes. As a bonus, if
you write down the problem it will prepare you for other strategies.
3) Ask: 'what has changed recently?'
What have you just added? Which line did you copy and paste? If so
reverse engines, revert to how it was and see if that cures the problem.
Pattern recognition is a vital troubleshooting skill. Look for patterns,
spot what is out of the ordinary, such as file name that is different, or a
spelling misNake in a variable.
|