Fixing Microsoft VBScript compilation error 800A0408: Invalid character
When you run a newly authored VBScript code that you copied from an existing/working script, you may possibly receive the “Microsoft VBScript compilation error 800A0408: Invalid character” as shown below.
—————————
Windows Script Host
Script: C:TestRunBatch.vbs
Line: 1
Char: 1
Error: Invalid character
Code: 800A0408
Source: Microsoft VBScript compilation error
—————————
OK
—————————
Analysis: This error usually indicates that there is an invalid character in the script that VBScript compiler can’t understand. Thus it fails with the error.
Cause: Very common cause for this error would the File Encoding used by the IDE/Editor software that you used to author/copy this script.
Fix: You need to ensure that your VBScript is encoded in ANSI format for the VBScript compiler to successfully execute your script.
How to Apply the fix: For the newbie’s, they can use any of the latest text editors like Notepad++, Notepad2, etc,. where you have an option to change the File Encoding. My recommendation and much simpler tool is Notepad2 which gives to this option as shown below:
Handling it in default Notepad:
8 thoughts on “Fix: Microsoft VBScript compilation error 800A0408: Invalid character”
Holy Sh*T thanks! i look all webs and nothing about this error very thanks ^^!
THANKS MAN ..just to correct you …simple NOtepad also gives you option to save it as ANSI code.FILE_>SAVE AS.
NEWAZ thanks a lot
actually i have normal note pad ,there is no option like Encoding,,Is there any other answer plsssssssssssss
Updated the post with available option in default Notepad.
I still get the error even after going through every step multiple times on rugular notepade because I crashed notepad++. Any help? Here’s the entire VBScript coding @ECHO off
:top
START %SystemRoot%system32notepad.exe
GOTO top
In the file, double quote character may be problem.
ex: WScript.CreateObject(“WScript.Shell”)
try to replace ” with new one on the keyboard.
“MYSTRING=(80000000)”
Hi Rakesh,
What are you trying to say?