wrote on 10 okt 2006 in microsoft.public.inetserver.asp.general:
Hi everybody,
I want to run a bat file which is on different PC in the same network.
I am able to run a batch file in my PC through the following code
<%
set wshell = CreateObject("WScript.Shell")
wshell.run "c:\file.bat"
set wshell = nothing
%>
but if I change the path to some network ,like
<%
set wshell = CreateObject("WScript.Shell")
wshell.run "\\10.101.xx.xxx\folder\file.bat"
set wshell = nothing
%>
the code is not working.
What a strange idea setting up a shell, and then expecting this shell to
run on another machine than the one it is set up in.
Does anybody have an idea on how to run the batch file in network
through ASP?
Asp is just a html renderer, and can run allowed processes on the server.
So you will have a proces [the above shell in the case of a .bat] on the
server do that, or compromise the client security by running a proces
[shell & .bat] on the client by html.
Or you could skedule a proces on the client interrogating a server's .asp
file regularly if a client .bat file should be started.
All 3 are outside asp, this NG's topic.
So the answer to your Q seems to be: "impossible".
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)