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
Professional Software Development Tools
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
Take a look at the help for File.Run
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)
I've used Shell.Execute because the help suggests to use this instead of File.Run, but I'll try with the last.As suggested, I would use File.Run() instead of Shell.Execute(), not that there is a big difference, but a subtle one...
Yes, naturally, this depends of what the external installer returns. I need working on these. Thanks.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.