giving something back after taking a lot :-)

Maik Koster at myITforum.com

”Invalid character” error in vbs script referenced by hta

April 11, 2010

Today I experienced a problem that was running me mad. I was working on a modification of an existing hta downloaded from the internet (more on this later ;-) ). The first time I ran it to verify the changes made so far, I got a Script Error stating an invalid character in Line 1, Char 1 in a script that was referenced in the hta:

image

I was pretty sure that the mentioned script was OK as it is a core library I’ve used quite often before. But to be sure I checked the script again if it contains any invalid character or anything else more or less obvious to the script. Searching the internet also did not really help as this problem was mostly really caused by an invalid character due to copy&paste operations.

OK, to make a long story short. In the end it turned out, that I simply forgot to “Unblock” the file after I had downloaded it.

image

After “unblocking” the file, everything was working again as it should. So just in case anybody else is experiencing this issue. The error message doesn’t necessarily has anything to do with the actual problem. Don’t waste your time with the script itself before making sure it’s worth the time spent. ;-)

Filed under: , ,

Comments

  • No Comments