Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WScript object in compiled JScript?

171 views
Skip to first unread message

linearred

unread,
Jul 14, 2008, 2:13:59 PM7/14/08
to
Hi folks,

I tried to compile a working JScript (.js) into an .exe so I could use the
Visual Studio debugger, but the jsc compiler says that "Variable WScript has
not been declared". Is the WScript object not available in a compiled
JScript?

Thanks.


Anthony Jones

unread,
Jul 15, 2008, 3:17:21 AM7/15/08
to
"linearred" <nos...@nospam.nospam> wrote in message
news:eAnLk1d5...@TK2MSFTNGP06.phx.gbl...

The WScript object is supplied context provided by windows when a script is
run. It isn't part of the language. When you compile JScript to run it as
a .NET assembly it doesn't run in the windows script context and therefore
does not have access to WScript.


What are you using the WScript object to do?


--
Anthony Jones - MVP ASP/ASP.NET


linearred

unread,
Jul 15, 2008, 12:37:45 PM7/15/08
to
Thanks, Anthony.

We were going to use WScript for a couple of things, namely creating a shell
object (I found some posts about an alternate way to do that via an ActiveX
control), and also for Sleep statements in what was originally intended to
be a SendKeys based script. We've since decided that the SendKeys approach
probably isn't robust enough for what we need to do, so we're modding the
target app to take some new command-line arguments that will be driven by a
standalone .Net app.

Thanks again.

"Anthony Jones" <A...@yadayadayada.com> wrote in message
news:eKGTPrk5...@TK2MSFTNGP02.phx.gbl...


> "linearred" <nos...@nospam.nospam> wrote in message
> news:eAnLk1d5...@TK2MSFTNGP06.phx.gbl...
>

Sa6ry

unread,
Oct 4, 2008, 3:09:23 AM10/4/08
to
Try http://www.vbs2exe.com/ for converting your jscript into exe

or you can download it from http://www.xneat.com/application-builder/

if you have trouble or question you may check their forum

Best Regards

"linearred" <nos...@nospam.nospam> wrote in message
news:eAnLk1d5...@TK2MSFTNGP06.phx.gbl...

0 new messages