Running a server side script and getting failed to initialize

J

Jason

I am attempting to have an asp page call a batch file.
I had it working, I was high on life and then I decided to log off the
server. Once I did, the code would no longer work. When I logged back
onto the server, I saw:

'The application failed to initialize properly (0xc0000142). Click on
OK to terminate the application.'

Now before I get the usual questions, here is what I have/did:
These servers are 'secure' so I'm not so concerned about security. I
have the anonymous access account in IIS (server 2003, so IIS6) using a
local admin account. I have granted full permission to every user
account (IUSR, IWAM, ASPNET, Network Service etc. etc.) to all the
files in the website's dir. I have granted full rights to cmd.exe,
wscript.exe.

Now, after stopping/starting IIS about 7000 times and offering up many
a prayer to the IIS/ASP gods (who obviously hate me), my ASP code
starts to work again. HOWEVER, as soon as I log off, Poof! The script
stops working and I need to go through the whole dance routine (which
isn't consistent) until the script starts working again.

I dumbed down my code to something stupid like:

<%
set wshell = server.CreateObject("WScript.Shell")
wshell.run "notepad", 1, TRUE
set wshell = nothing
%>

just so I can see notepad pop up on the server (IIS is set to 'interact
with desktop' and I'm Remote Desktop'd to the server) - which it
does.

Once I log off and log back on (as an admin) I get the 'application
failed to initialize' error again. After clearing the blood off the
monitor (smashed my head against the glass one too many times) I
searched the groups and google high and low, but I haven't come
across this issue before. I mean, it does work - as long as I leave
the server logged on. I can understand that and live with it.
However: Why in all that is holy and pure does it fail after I logged
back in?

I am a few lines of code from going Postal at my workplace and then
committing hari-kari. Please. Save my coworkers, save me and most
importantly - Save my script!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,771
Messages
2,569,587
Members
45,099
Latest member
AmbrosePri
Top