|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to run a bat file in remote PC through ASPI 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. Does anybody have an idea on how to run the batch file in network through ASP? Any help would be appreciated. wrote on 10 okt 2006 in microsoft.public.inetserver.asp.general:
Show quoteHide quote > Hi everybody, What a strange idea setting up a shell, and then expecting this shell to > > 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. 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 Asp is just a html renderer, and can run allowed processes on the server.> through ASP? 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) kk.simha***@gmail.com wrote:
> Does anybody have an idea on how to run the batch file It may be possible to use ASP to initate a batch file on the machine hosting > in network through ASP? the ASP script. You could then trigger that process via an HTTP request. I presume this is not what you are after, however, in which case there is no advantage to using ASP. I recommend that you check out the MSDN script repository: http://www.microsoft.com/technet/scriptcenter/scripts/ -- Dave Anderson Unsolicited commercial email will be read at a cost of $500 per message. Use of this email address implies consent to these terms.
retreiving data from html page
Quizz script performance bug -- too many questions? interesting problem... call store procedure for inserting data in asp SMTP how can i detect multiplt VBNewLine's in a row Assign Javascript value to asp session variable Session variable randomly mixed or lost? Running Bat file from ASP on Windows Server x64 problem. Richard Mueller... you out there? |
|||||||||||||||||||||||