Results 1 to 4 of 4

Thread: Start External App

  1. #1

    Thread Starter
    Registered User
    Join Date
    May 2001
    Posts
    61

    Start External App

    Hi all,

    I need to start an external application from within my program. This is usually no big deal using shell(), but in this case I need to set the working directory first.

    Can someone help out with that? The equivalent batch file would look like:

    cd "\Program Files\externalapp"
    externalapp.exe

    Normally, I'd do the batch file thing, but my program is a frontend for several programs, so I'd have to create several batch files, which would be counterproductive.

    Thanks,
    Gabe

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Are you using a CommonDialog Control?

    If so try this:

    VB Code:
    1. Private Sub Command1_Click()
    2. CMD1.InitDir = Text1.Text
    3. CMD1.ShowOpen
    4. End Sub

    I hope I have understood your question correctly.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3

  4. #4

    Thread Starter
    Registered User
    Join Date
    May 2001
    Posts
    61
    I'm not using the CommandDialog, but that's probably because I've never heard of it. I'll look into it and see if it will work here.

    Thanks for the suggestion.

    As for the chdir, that looks like a fairly simple solution, so I'll give that a shot too. Thanks.

Posting Permissions

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



Click Here to Expand Forum to Full Width