473,287 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

how to run a bat file in remote PC through ASP

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.

Does anybody have an idea on how to run the batch file in network
through ASP?

Any help would be appreciated.

Oct 10 '06 #1
2 3132
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)
Oct 10 '06 #2
kk*********@gmail.com wrote:
Does anybody have an idea on how to run the batch file
in network through ASP?
It may be possible to use ASP to initate a batch file on the machine hosting
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.
Oct 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Peter A. Schott | last post by:
If I want to verify that a file has finished writing before deleting the remote file, what would be the best method? Current code on Python 2.4: #filename - remote FTP server File Name...
4
by: Rene' Nielsen | last post by:
Context: Running Windows 2003 Server on an intranet. A web is configured with an anonymous access account that is a domain account that has been granted the desired access to a file on another...
3
by: Daniel | last post by:
Is it possible to retain local file system read, write, delete access while impersonating for access to a remote drive in a different domain? I need to be able to move files from a local computer...
1
by: POnfri | last post by:
Hi, I have a problem in a peace of code were i'm doing a file copy using File.Copy. The Source is local and the target is a remote machine. Example: File.Copy(C:\temp\hi.txt,...
1
by: Saracen | last post by:
I have a major problem with trying to access a foxpro database from a web app. I have created a web app which is deployed on a server. The foxpro database (dbf) is on a different server. The...
18
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't...
1
by: Duffman | last post by:
Hi, I have what seems to be a common problem, but the solutions I've found don't seem to work. I would like to use a web service to create a file at a UNC location in a shared file. Currently...
5
by: idorjee | last post by:
hi guys, I'm trying to figure how to read a file from my other computer, and here is what i did. it doesn't work for some reason. i would really appreciate if you could help me with this. i get...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
1
by: Bob Jones | last post by:
I am using ASP.NET 2.0 w/ c#. I have an Http handler that intercepts any request labeled .file. I am trying to have this handler serve up a file from a remote location (public) and I do not want to...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.