Running a VBS script resulted in error Microsoft VBScript compilation error: Invalid character
The line of code apparently containing invalid character was:
Const ForWriting = 2
Opening in a Hex Editor it was revealed the “spaces” before the word const were something else
Selecting the blank spaces, copying them, pasting into a notepad search/replace didn’t remove them.
Using HexEdit I search/replaced the relevant bytes with 09 (tab)
After this some instances of C2 or A0 were on their own still causing the error, these I replaced with 0x20 (space)
After this the script ran fine…