Discussion:
Windows Script Host Error - JScript but not VBScript
(too old to reply)
Michael Harris (MVP)
2007-07-11 23:02:12 UTC
Permalink
When trying to run *any* JScript code from the Windows Script Host, I
Line: 1
Char: 1
Error: '<some ascii gibberish>' is undefined
Code: 800A1391
Source: Microsoft JScript runtime error.
(or refer to the attached screen shot)
Sounds like a text encoding problem. I can deliberately cause a similar
problem if I save a *.js file with Notepad as Unicode big endian or UTF-8.
- Executing VBScripts via the Windows Script Host works fine.
- Executing JScript via my web browser, whether it is general www
browsing or local web development works fine.
- My PC is Windows XP pro, SP 2.
Why am I unable to run JScript code via the Windows Script Host?
Thanks.
--
Michael Harris
MVP- Admin Frameworks
Just Me
2007-07-12 18:47:37 UTC
Permalink
Thanks, Michael. That's it! Oddly enough I created the vbs and js
files using the same VS 2005 editor. That led me astray. I reopened the
js file in notepad and saved it appropriately with ANSI encoding. It
now works.
Post by Michael Harris (MVP)
When trying to run *any* JScript code from the Windows Script Host, I
Line: 1
Char: 1
Error: '<some ascii gibberish>' is undefined
Code: 800A1391
Source: Microsoft JScript runtime error.
(or refer to the attached screen shot)
Sounds like a text encoding problem. I can deliberately cause a similar
problem if I save a *.js file with Notepad as Unicode big endian or UTF-8.
- Executing VBScripts via the Windows Script Host works fine.
- Executing JScript via my web browser, whether it is general www
browsing or local web development works fine.
- My PC is Windows XP pro, SP 2.
Why am I unable to run JScript code via the Windows Script Host?
Thanks.
asdf
2007-08-01 07:57:15 UTC
Permalink
Nice, 2005 VS a $ product.

Ohh, and notepad.

Ahh, sure

----------------------------

And we are in software Kansas here.
Thanks, Michael. That's it! Oddly enough I created the vbs and js files
using the same VS 2005 editor. That led me astray. I reopened the js file
in notepad and saved it appropriately with ANSI encoding. It now works.
Post by Michael Harris (MVP)
When trying to run *any* JScript code from the Windows Script Host, I
Line: 1
Char: 1
Error: '<some ascii gibberish>' is undefined
Code: 800A1391
Source: Microsoft JScript runtime error.
(or refer to the attached screen shot)
Sounds like a text encoding problem. I can deliberately cause a similar
problem if I save a *.js file with Notepad as Unicode big endian or UTF-8.
- Executing VBScripts via the Windows Script Host works fine.
- Executing JScript via my web browser, whether it is general www
browsing or local web development works fine.
- My PC is Windows XP pro, SP 2.
Why am I unable to run JScript code via the Windows Script Host?
Thanks.
Loading...