Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2009
    Posts
    16

    Thumbs down Shell.Execute problem

    Hi to all.

    I have a question regarding the Shell.Execute function. I use the function to start the installation of an application. But how can I determine if the install ends correctly or has been aborted?

    Thanks.
    Xry

  2. #2
    Join Date
    Apr 2006
    Posts
    127
    Take a look at the help for File.Run

  3. #3
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    You would need to evaluate two things:
    1) Application.GetLastError()
    2) The return value when using WaitForReturn = true.

    As suggested, I would use File.Run() instead of Shell.Execute(), not that there is a big difference, but a subtle one...

    Now, that you have those two values -- the problem is, does the installer you're spawning return an error code? If it doesn't, or it's not documented (ie: 0 = success, 1 = user caneled, 2 = install aborted, 3 = missing file etc) then you have to experiment to determine if the installer succeeded or not.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  4. #4
    Join Date
    Mar 2009
    Posts
    16
    As suggested, I would use File.Run() instead of Shell.Execute(), not that there is a big difference, but a subtle one...
    I've used Shell.Execute because the help suggests to use this instead of File.Run, but I'll try with the last.

    Now, that you have those two values -- the problem is, does the installer you're spawning return an error code? If it doesn't, or it's not documented (ie: 0 = success, 1 = user caneled, 2 = install aborted, 3 = missing file etc) then you have to experiment to determine if the installer succeeded or not.
    Yes, naturally, this depends of what the external installer returns. I need working on these. Thanks.

Tags for this Thread

Posting Permissions

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