i need a code to where when you click a buton it will open a dialog to open a .bat folder. it will run the .bat file in a textbox ..
please help me......
[HELP] running a .bat file
Started by jamietrent, Dec 31 2009 01:32 PM
4 replies to this topic
#1
Posted 31 December 2009 - 01:32 PM
|
|
|
#2
Posted 31 December 2009 - 02:33 PM
Use a CommonDialog object and look at this tutorial (there are a few pages, links to the next page are just above the Comments section). You can also look here for C#-specific information.
As far as running the .BAT, look at this tutorial. I'm not entirely sure how the Process.Start part will handle .BAT files. You can try putting just the filename of the batch program, or you might need to have "cmd.exe " followed by the name of the batch program.
For getting the output you're going to need to use Process.StandardOutputProperty and update the textbox periodically.
As far as running the .BAT, look at this tutorial. I'm not entirely sure how the Process.Start part will handle .BAT files. You can try putting just the filename of the batch program, or you might need to have "cmd.exe " followed by the name of the batch program.
For getting the output you're going to need to use Process.StandardOutputProperty and update the textbox periodically.
sudo rm -rf /
#3
Posted 31 December 2009 - 02:33 PM
#4
Posted 31 December 2009 - 02:45 PM
no i just need a code to where it will show the lines of a .cmd running in a textbox.
#5
Posted 01 January 2010 - 08:17 AM


Sign In
Create Account


Back to top









