How can you launch a command line or DOS prompt?
File.Run("c:\windows\system32\cmd.exe", "", "", SW_SHOWNORMAL, false);
Does not seem to work.
Professional Software Development Tools
How can you launch a command line or DOS prompt?
File.Run("c:\windows\system32\cmd.exe", "", "", SW_SHOWNORMAL, false);
Does not seem to work.
This works for me in a button on click -
p.s. - you have to escape backslashes i.e. -Code:result = File.Run("cmd.exe", "", "", SW_SHOWNORMAL, false);
File.Run("c:\\windows\\system32\\cmd.exe", "", "", SW_SHOWNORMAL, false);
Last edited by longedge; 05-08-2006 at 03:03 PM.
Thanks! Works great. It's always something simple.
Now for another question. Can you launch a specific command, such as "ipconfig" from the command line and do all of this with a single button click? One button click: open command line, run ipconfig.
Yes certainly, my own preference is to make a batch file and then run that. One of the reason I use this method is because I could never succesfully incorporate command line parameters - the correct syntax always eludes meOriginally Posted by critter
. If I can find a moment later, I'll post an example.
Thanks!!! That would be awesome and greatly appreciated.
OK try this - it has 3 buttons each runs a different .bat and I've put a 'pause' at the end to stop the dos window closing.
You could incorporate a pipe command to direct output from the batch file to another text file and then after a 'wait' load the resultant text file into a paragraph object to keep it all inside the AMS app.