Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. running a batch file from asp.net web page

running a batch file from asp.net web page

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadminhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    markymark82
    wrote on last edited by
    #1

    Hi, I am having trouble running a .bat file from my web application. The file is run by the server but it doesn't perform its function correctly. I can run the .bat file on the server my self and it works fine, so it not written wrong, but when run by my aspx page it just doesn't do what it is supposed to. I have tried a couple of different methods and neither seem to work. The app is impersonating an admin account on the server with full domain admin permissions, and the .bat file is running accross multple servers. does anyone have any Idea what may be the problem? many thanks mark

    N 1 Reply Last reply
    0
    • M markymark82

      Hi, I am having trouble running a .bat file from my web application. The file is run by the server but it doesn't perform its function correctly. I can run the .bat file on the server my self and it works fine, so it not written wrong, but when run by my aspx page it just doesn't do what it is supposed to. I have tried a couple of different methods and neither seem to work. The app is impersonating an admin account on the server with full domain admin permissions, and the .bat file is running accross multple servers. does anyone have any Idea what may be the problem? many thanks mark

      N Offline
      N Offline
      Nicejith
      wrote on last edited by
      #2

      can you try this..? Process pr = new Process(); pr.StartInfo.RedirectStandardOutput = true; pr.StartInfo.UseShellExecute = false; pr.StartInfo.FileName = Server.MapPath("urapp.bat"); pr.StartInfo.Arguments = "your arguments" pr.Start(); pr.WaitForExit(); pr.Close();

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups