Runing exe or a bat file on server side using asp

Runing exe or a bat file on server side using asp

am 21.11.2006 12:15:01 von Donken

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;
%>


UntitledDone!
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
--
mastar

Re: Runing exe or a bat file on server side using asp

am 21.11.2006 12:40:47 von Kevin Hayes

"mastar" wrote in message
news:3430A20B-1046-4CCF-A32D-62F491714512@microsoft.com...
> 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;
> %>
>
>
> UntitledDone!
> 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
> --
> mastar


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

Re: Runing exe or a bat file on server side using asp

am 21.11.2006 13:31:01 von Donken

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 ?

--
mastar


"Slim" wrote:

>
> "mastar" wrote in message
> news:3430A20B-1046-4CCF-A32D-62F491714512@microsoft.com...
> > 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;
> > %>
> >
> >
> > UntitledDone!
> > 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
> > --
> > mastar
>
>
> hold down shift and right click EXE file and see if you can run it as
> Network_Service.
>
>
>
>

Re: Runing exe or a bat file on server side using asp

am 22.11.2006 15:12:20 von Kevin Hayes

"mastar" wrote in message
news:59718801-A266-4178-900C-868DCE5E5768@microsoft.com...
> 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_

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?

> --
> mastar
>
>
> "Slim" wrote:
>
>>
>> "mastar" wrote in message
>> news:3430A20B-1046-4CCF-A32D-62F491714512@microsoft.com...
>> > 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;
>> > %>
>> >
>> >
>> > UntitledDone!
>> > 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
>> > --
>> > mastar
>>
>>
>> hold down shift and right click EXE file and see if you can run it as
>> Network_Service.
>>
>>
>>
>>

Re: Runing exe or a bat file on server side using asp

am 04.12.2006 22:24:00 von Donken

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
--
mastar


"Slim" wrote:

>
> "mastar" wrote in message
> news:59718801-A266-4178-900C-868DCE5E5768@microsoft.com...
> > 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_
>
> 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?
>
> > --
> > mastar
> >
> >
> > "Slim" wrote:
> >
> >>
> >> "mastar" wrote in message
> >> news:3430A20B-1046-4CCF-A32D-62F491714512@microsoft.com...
> >> > 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;
> >> > %>
> >> >
> >> >
> >> > UntitledDone!
> >> > 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
> >> > --
> >> > mastar
> >>
> >>
> >> hold down shift and right click EXE file and see if you can run it as
> >> Network_Service.
> >>
> >>
> >>
> >>
>
>
>

Re: Runing exe or a bat file on server side using asp

am 26.01.2007 03:00:14 von 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.

On Dec 4 2006, 1:24 pm, mastar wrote:
> 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
> --
> mastar
>
> "Slim" wrote:
>
> > "mastar" wrote in message
> >news:59718801-A266-4178-900C-868DCE5E5768@microsoft.com...
> > > thanks for you replay
> > > i did what you told me and used the run as , but it wouldnt let me enter
> > > the
> > >Network Serviceas a user or pick it out from the list
>
> > > what now ?
>
> > ok
>
> > are you sure its notrunningas IUSR_
>
> > 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?
>
> > > --
> > > mastar
>
> > > "Slim" wrote:
>
> > >> "mastar" wrote in message
> > >>news:3430A20B-1046-4CCF-A32D-62F491714512@microsoft.com...
> > >> > Hi all
>
> > >> > im trying to run a file localy on my server (2003) usingasp, this is
> > >> > the
> > >> > code :
> > >> > <%@ LANGUAGE = "JAVASCRIPT" %>
> > >> > <%
> > >> > var commandLine = "File_NAME.EXE";
> > >> > var WshShell = Server.CreateObject("WScript.Shell");
> > >> > WshShell.Run(commandLine);
> > >> > WshShell = null;
> > >> > %>
> > >> >
>
> > >> > UntitledDone!
> > >> > 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
> > >> > --
> > >> > mastar
>
> > >> hold down shift and right click EXE file and see if you can run it as
> > >> Network_Service.