0

I don't know whether its possible or not. But i want to create on page in which user can upload one .bat file and get the output on webpage. So is it possible to run and show batch file on web page? If yes then how?

It will be like online execution of my batch program. If you have any idea about it then comment please.Thanks.

  • Duplicate - see http://stackoverflow.com/questions/25807856/how-to-redirect-command-line-output-to-a-aspx-page-using-c – Adam Tuliper Jan 27 '16 at 18:35
  • You want users to upload batch files to run on your server? I hope nobody uploads something (either accidentally or maliciously) that wipes out your server (or worse)... – Krease Jan 27 '16 at 18:46
  • Batch is a file-based program. The security concerns alone should chase you away. – Bloodied Jan 28 '16 at 03:01

2 Answers2

0

Im 100% that you can't run the .bat file on your server without doing alot of work but im sure that you can show the content of the .bat file on a website if thats what you mean.

NizonRox
  • 143
  • 14
0

If your server runs on PHP you can execute cmd scripts (if server is hosted on windows) Doing:

System("echo hi")

will print hi

Yakov .P
  • 88
  • 8