How to Run Batch file from Asp.Net

Discussion in 'ASP .Net' started by Vijay Kumar, Mar 14, 2007.

  1. Vijay Kumar

    Vijay Kumar Guest

    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......
     
    Vijay Kumar, Mar 14, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike John

    How to run a batch file.

    Mike John, Jul 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    420
    Saravana
    Jul 23, 2003
  2. =?Utf-8?B?WjBnUw==?=

    Use process class to run batch file in web server

    =?Utf-8?B?WjBnUw==?=, Feb 17, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    3,722
    =?Utf-8?B?WjBnUw==?=
    Feb 18, 2004
  3. viki

    run batch file in client side

    viki, Nov 14, 2004, in forum: ASP .Net
    Replies:
    8
    Views:
    25,229
    dotman112
    Aug 20, 2010
  4. Replies:
    2
    Views:
    1,085
    Ken Cox - Microsoft MVP
    Feb 3, 2006
  5. Uday
    Replies:
    1
    Views:
    163
Loading...

Share This Page