Runing exe or a bat file on server side using asp

M

mastar

Hi all

im trying to run a file localy on my server (2003) using asp , this is the
code :
<%@ LANGUAGE = "JAVASCRIPT" %>
<%
var commandLine = "File_NAME.EXE";
var WshShell = Server.CreateObject("WScript.Shell");
WshShell.Run(commandLine);
WshShell = null;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html><head><title>Untitled</title></head><body>Done!</body></html>
this is what i got so far , when i run the page i can see in the task
manager that the file do start but nothing happand ! i also notice that the
user that is runing this file called "Newwork service" failing to work i
tryed to give Newwork service more permissions using the local secuty policy
tool at the control panel (also didnt worked )
i just dont get it , it sould be trivial but it just doesnt works
help will be most appreciated
 
S

Slim

mastar said:
Hi all

im trying to run a file localy on my server (2003) using asp , this is the
code :
<%@ LANGUAGE = "JAVASCRIPT" %>
<%
var commandLine = "File_NAME.EXE";
var WshShell = Server.CreateObject("WScript.Shell");
WshShell.Run(commandLine);
WshShell = null;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html><head><title>Untitled</title></head><body>Done!</body></html>
this is what i got so far , when i run the page i can see in the task
manager that the file do start but nothing happand ! i also notice that
the
user that is runing this file called "Newwork service" failing to work i
tryed to give Newwork service more permissions using the local secuty
policy
tool at the control panel (also didnt worked )
i just dont get it , it sould be trivial but it just doesnt works
help will be most appreciated


hold down shift and right click EXE file and see if you can run it as
Network_Service.
 
M

mastar

thanks for you replay
i did what you told me and used the run as , but it wouldnt let me enter the
Network Service as a user or pick it out from the list

what now ?
 
S

Slim

mastar said:
thanks for you replay
i did what you told me and used the run as , but it wouldnt let me enter
the
Network Service as a user or pick it out from the list

what now ?

ok

are you sure its not running as IUSR_<SERVER>

you also said you were looking into permissions using the local security
policy, did you check log on as batch job?

What is this file compiled from, VB, C++ ??

does it in turn use other resources that need permissions?

Can you register it as a COM+ instade of a EXE?
 
M

mastar

thanks for you help Slim , anyway this is what i did and its working
i changed the user that the IIS is working with from Network services to
System (and i know that i just created a huge security hole - but what can i
do ! nothing else worked ) now i need to find out how do i protect my self
from this breach
 
B

beatlepl

Hye Master,
Can you let me know how you have changed the user from Network Services
to System.
I am also running through this issue long time. As far as the security
is concerned it ok for me.
Making the thing run is more important for me now.

Beatle.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top