|
|
|
|
#1 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Problem...
I have a small update part to my app, which checks the internet for updates, and then downloads the update.
Now, the update that I want to download is actually the app itself, so how can I get my app to be updated? -Stu |
|
|
|
|
|
#2 |
|
NSIS Dev
Join Date: Apr 2003
Location: Portugal
Posts: 110
|
What's your "small update part"? some nsis installer that is installed with your application and allows user to update main application?
If yes, you need to know the destination of app itself (using registry for e.g.) and download internet update to some temporary file, then when completed do copyfile over the old file, If I understood your problem, I think that your problem can be solved this way. cyas Ramon |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
No.
My installer wants to update itself. On init, it checks for updates, and if there is one, I want it to download the update over itself, quit, then reload. This is not possible is it? -Stu |
|
|
|
|
|
#4 |
|
NSIS Dev
Join Date: Apr 2003
Location: Portugal
Posts: 110
|
Yes, it's possible but of course installer cannot write over itself, but you can do this:
- GetTempFile and download to that file - You can ask user where he want to store updated installer - After download complete call Exec on that file and quit as fast as possible good luck |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
But it still won't overwrite itself, and the user might select the non-updated installer to save over, and then it won't download.
I've simply got it to save to a different file, opened up the saved-to dir, and told the user to manually overwrite it (kinda ugly way of doing it) -Stu |
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Do what NSIS Update and the uninstaller does. Copy over your installer to a temporary file, execute it with a special command line parameter and have it update the original file. You can also create a small updater that will be called if there's an update.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|