How to Run Batch file from Asp.Net

V

Vijay Kumar

Hi,

I have a batch file(test.bat) i wrote a command to rename a text file in this batch file. Both batch file and text files are in Network Shared Drive. I am trying to run that batch file from ASP.NET application using VB.NET as a code behind. The following is the code i wrote,

Dim p as new ProcessStartInfo

p.WorkingDirectory = '\\networkSharedDrive\SharedFolder\"

p.FileName = "testcab.bat"

p.UseShellExecute = True

Process.Start(p)

This code is executing fine, It is not giving any error also. But the text file name is not changing. When i double clicking on that Batch file the name of the text file is changed. Through the above code it is not working. I already given Impoersonate to true also…..

Any ideas....pls help me......
 

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

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top