Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quitting to another application
Message
From
05/03/2009 15:33:19
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01385741
Message ID:
01385979
Views:
47
>>>Maybe I lead you into confusion, Tore. You said "if you want to replace the running program", and I clarified that I never wanted to do that, because I know it cannot be done. I want to replace a program that calls another, not a program that is running. The caller is the main program, it's the callee that will perform the replacement.
>>>
>>>I thank you for all your remarks.
>>
>>So to use my earlier terms, you want the "main" program to replace the "loader"?
>
>Antonio wants to launch Updater from the main program and quit the main program. The Updater will replace the main program and start it again.

OK. Wouldn't this pseudocode work:
*Main.exe
Shellexecute Updater
quit
*Updater
Do killMain && Sergey's code to make sure that Main.exe is removed from memory
Copy file newmain.exe to main.exe
Shellexecute Main
quit
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform