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

WSH Failed to Initialize on debug...

229 views
Skip to first unread message

DavidS

unread,
Oct 20, 2008, 12:39:01 PM10/20/08
to
I'm trying to debug a vbscript as a non-admin on my box using the following
command line:

wscript.exe /d /x "C:\Documents and
Settings\usernameStovall\Desktop\RedirectMyDocumentsAndMail.vbs"

I get an instant popup: Initialization of the Windows Script Host failed.
(Access denied.)

I never got this message when developing the script when I was Administrator
on the box. I need to debug the script as an ordinary user so I can see
permissions issues.

How can I make it work as an ordinary user?

Thanks.

Pegasus (MVP)

unread,
Oct 20, 2008, 1:16:09 PM10/20/08
to

"DavidS" <Dav...@discussions.microsoft.com> wrote in message
news:F6BBD255-DD01-4869...@microsoft.com...

Perhaps doubling your slashes might help?
wscript.exe //d //x "C:\Documents and . . .

If it doesn't then I suggest you insert a number of statements such as
wscript.echo "Label 1"
wscript.echo "Label 2"
into strategically selected places in your code so that you can see how far
the code gets. You will need to run cscript.exe instead of wscript.exe to
make this work.


DavidS

unread,
Oct 20, 2008, 5:50:01 PM10/20/08
to
Solved. I was previously a local-admin on the box. I therefore was a member
of the local debuggers group (part of every machine security list). I was
able to run the debugger without a problem.

When I wanted to run the script as a normal (non-admin) user, I lowered
myself out of the local admininstrator group (becoming a normal user) who is
not normal a member of the debugger's group. This kept me (by design) from
running the script.

I logged back in as admin, added my non-admin id to the debugger's group,
logged back on as "joe average" and everything worked as advertised.

Thanks for the help though.

DavidS

Joe Fawcett

unread,
Oct 22, 2008, 5:56:32 AM10/22/08
to

"DavidS" <Dav...@discussions.microsoft.com> wrote in message
news:2DB035C7-E153-4839...@microsoft.com...
As a matter of interest why use both 'd' and 'x' switches?

--

Joe Fawcett (MVP - XML)
http://joe.fawcett.name

jsmor...@gmail.com

unread,
Jul 20, 2012, 5:28:51 AM7/20/12
to
0 new messages