|
-
Nov 19th, 2001, 05:08 AM
#1
Thread Starter
New Member
Automatic Upgrade of My App by My App
Goor Morning,
I have been trying all morning to find out if there was a simple way for an executable to upgrade itself.
For example, I have an application ( exe ) running that verifies if there is a newer version of itself available on the intranet. If there is such a file, it would stop itself running, copy the file and restart itself.
It should probably start the copy before stopping but then would it not generate an error during the copy operation ?
I thought of writing a COPY program that would delay the copy until the exe has stopped running or something to that effect, but before trying further, I just wanted to know if anybody has inputs for me on this. I don't want to reinvent the wheel.
Also, how to have the application restart itself after the copy operation ?
Thanks for your help.
NP
-
Nov 19th, 2001, 05:16 AM
#2
Retired VBF Adm1nistrator
What you could do is this.
Check if there's a new version. If there is, then download as a different filename. Then write another little app that waits to see until the main exe has ended.
So once you download the file, run this other program, and then call End. Then the other program detects that the app has finished running, and then copies the newer executable on top of the old, and then runs it, and calls End itself ...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Nov 19th, 2001, 05:16 AM
#3
I would suggest deviding your application into two exe files.
First you have a small "launch exe" that will check for newer version and if not found launch the other exe (which is the actual program).
If it founds a newer version simply copy it first and then launch the new version.
You could let your "main exe" (that is not the launch program) require some sort of command line argument to launch.
This command line argument is passed by the launch program.
If the main program doesn't get the command line it launches the launch program and exit.
-
Nov 19th, 2001, 05:33 AM
#4
Thread Starter
New Member
Thanks for your help guys, I appreciate it very much.
I'll see what I can do with the two possible solutions you provided.
Best regards,
NP
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|