Results 1 to 12 of 12

Thread: [RESOLVED] Launch external app and wait

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Resolved [RESOLVED] Launch external app and wait

    Hi,

    I can shell execute a programme, but I want to wait until that program is finished running before continuing on to the next line of code, is this possible?

    Thanks in advance.

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Launch external app and wait

    do a search for ShellAndWait.

    For example, see #17 in this post

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Re: Launch external app and wait

    Thanks for the quick reply!

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Re: Launch external app and wait

    Hmm, I get an "invalid procedure call or argument" error at the

    VB Code:
    1. executionStatus = Shell(FileName, vbNormalFocus)

    Line....

    Am I missing something?

    Forgive me it has been a long day...

    Thanks

  5. #5
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Launch external app and wait

    what is the value of 'filename' that you're passing to the procedure?

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Re: Launch external app and wait

    Actually, I think that may be part of the problem...

    VB Code:
    1. fileName = AppPath & "\files\MSDE\SqlRun16.msi disablenetworkprotocols=0 blanksapwd=1 securitymode=sql instancename=_T7DEMO_DB"

    I think it's the command line parameters that are messing it up... I thought I might be able to get away with including them as part of the string...

    any suggestions?

    Main reason Im doing this is as a front end for my installer, since i seem to be failing miserably with InstallShield 11 and getting it to install the MSDE first before prompting for SQL login....

    Thanks alot for the help...

  7. #7
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Launch external app and wait

    I just did a little test and I had no problems passing cmd line parameters.

    Just to check, is AppPath a typo? It should be App.Path

    Have you tried getting it to work without passing the parameters?

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Re: Launch external app and wait

    Yeah, a typo ( I manually typed the code here) but now that you mention it.........

    Ill have to look into the code again. Im at home now, I'll VPN into my computer at work and take a look. No doubt I typo'd it in the code as well....

    What a long day it has been!

    Thanks!

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Re: Launch external app and wait



    You hit the nail on the head, Bushmobile!

    I missed the period in app.path

    works like a charm!

    Thanks again for all your help.... maybe I should enlist you to proof read my code for typo's!!!!!!!

  10. #10
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Launch external app and wait

    Quote Originally Posted by jtruxxer
    Happens to the best of us

    maybe I should enlist you to proof read my code for typo's!!!!!!!
    got enough of them in my own code thanks!

  11. #11
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: Launch external app and wait

    This thread has been resolved if i'm not mistaken, so lets help the mods by marking this as Resolved. see instruction in my signature
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Re: [RESOLVED] Launch external app and wait

    Done! Thanks for the reminder

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