Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8

Thread: Is it possible?

  1. #1
    Join Date
    Dec 2005
    Posts
    4

    Is it possible?

    Hi

    I have a question:

    Is it possible to give an instruction

    of ams to c:\windows\system32\cmd.exe?

  2. #2
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Here is one way...

    You could create a small .bat (Batch file) that will do what you need. Open the .bat with say Notepad to see how to start the program you want started, for example).

    The code is in the On Show as far as AMS code goes.
    Attached Files
    Intrigued

  3. #3
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Quote Originally Posted by Down
    Hi

    I have a question:

    Is it possible to give an instruction

    of ams to c:\windows\system32\cmd.exe?
    Believe it or not, this works as well -

    File.Run("cmd", "", "", SW_SHOWNORMAL, false);

  4. #4
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    File.Run("cmd", "/k \"ipconfig\"", "", SW_SHOWNORMAL, false);

    This works too
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  5. #5
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    Down ... to get more of a grasp on some of the cmd.exe directives,
    at a command prompt type cmd.exe /?

    or cmd.exe /? > %temp%\cmdcomms.txt , one way to dump the directives for later refereal to your Temp Folder

    hth a little
    Last edited by Eagle; 03-06-2006 at 08:05 PM.

  6. #6
    Join Date
    Dec 2005
    Posts
    4
    Thanks!

    And how can I give an instruction when cmd.exe already is open?

  7. #7
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Remember folks:

    cmd.exe for Windows running NTFS

    command.com for Windows running FAT32

    Last edited by Intrigued; 03-13-2006 at 05:44 PM.
    Intrigued

  8. #8
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    If you are running Windows XP (2k) and have your primary partion set for C:\, then try this code in AMS (On Show of Page1 in a blank project):

    Code:
    File.Run("cmd", "/k ipconfig \&\& \"C:\\WINDOWS\\System32\\calc.exe\" \&\& \"C:\\WINDOWS\\System32\\desk.cpl\"", "", SW_SHOWNORMAL, false);
    Notice how the last dialog shows AFTER you close the calc.exe window.

    Hmmm...
    Intrigued

Posting Permissions

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