Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2005
    Posts
    13

    Launch Command Line

    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.

  2. #2
    Join Date
    Aug 2003
    Posts
    2,427
    This works for me in a button on click -

    Code:
    result = File.Run("cmd.exe", "", "", SW_SHOWNORMAL, false);
    p.s. - you have to escape backslashes i.e. -

    File.Run("c:\\windows\\system32\\cmd.exe", "", "", SW_SHOWNORMAL, false);
    Last edited by longedge; 05-08-2006 at 03:03 PM.

  3. #3
    Join Date
    Dec 2005
    Posts
    13
    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.

  4. #4
    Join Date
    Aug 2003
    Posts
    2,427
    Quote Originally Posted by critter
    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 me . If I can find a moment later, I'll post an example.

  5. #5
    Join Date
    Dec 2005
    Posts
    13
    Thanks!!! That would be awesome and greatly appreciated.

  6. #6
    Join Date
    Aug 2003
    Posts
    2,427
    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.

Similar Threads

  1. On Click launch external excutable file
    By bmeouf in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 07-12-2005, 05:12 AM
  2. Quick Launch Folder
    By csd214 in forum Setup Factory 7.0
    Replies: 1
    Last Post: 01-03-2005, 12:43 AM
  3. Help with readme.txt file to launch after build
    By sue in forum Setup Factory 6.0
    Replies: 5
    Last Post: 06-24-2004, 02:15 PM
  4. Launch Program from C:\Program Files
    By joey1barnes in forum AutoPlay Media Studio 5.0
    Replies: 5
    Last Post: 05-22-2004, 11:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts