vbjeff
Posts: 23
Joined: Tue May 14, 2013 3:08 pm

Auto Updater msi file not downloading

When I try to use the Auto updater it does not download the msi file with AI 10.5.1. I have a program that is running as a service and use the updater.exe installed as a service. My program periodically checks for updates, and I did notice that and updated .aiu file is located in the appropriate folder under the C:\ProgramData folder, but the .msi file never gets downloaded. If I double-click on the updater.exe file in the C:\Program Files (x86)\... folder where my service is installed everything works ok, but it does not work if I try to call the updater from my service. I have code to check 5 minutes after it is started, so I can stop and start the service to see if it works, but only the .aiu file shows up and not the .msi file.

Any ideas on what may be wrong or how I can fix it?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater msi file not downloading

Hello,

Please keep in mind that when you configure the Updater tool to handle updates without elevation there's no need to call it within another service. If you want to call it from your service application, then you can install the updater without configuring it to handle updates without elevation. Also, the updater should be called using a silent command line.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vbjeff
Posts: 23
Joined: Tue May 14, 2013 3:08 pm

Re: Auto Updater msi file not downloading

Thanks Daniel, I did not know that I did not need to run the updater.exe as a service if my program was installed as a service to handle updates without elevation. That should make it easier for me to get everything working properly.

When the updater determines that it needs to update the program, does it then copy itself to a Temp folder, and then the updater in the Temp folder is started and downloads the .msi file?

I found the cause for the .msi file not downloading on my computer, it was that the updater.exe process was stuck running from the Windows\Temp\... folder. It worked when I double-clicked on the updater.exe in my Program Files\... folder because it was run as the current user and copied the updater.exe into the user's temp folder and proceeded normally. If I tried to run it as a service, it tried to copy and run the updater.exe into the Windows\Temp\... folder because it was not running as the current user, but the SYSTEM user. Since there was already a copy of the updater.exe there and it was already running, the rest of the update process failed.

If the updater.exe that was run from the Program Files\... folder could determine if the updater.exe was already in the Temp folder and running, it would be helpful if it could close the process first, or simply copy the updater.exe into a new/unused folder in the temp folder. That way the updater could be more robust and not fail if there is a hanging updater.exe process. This could help me because I plan to use the updater on more than 10,000 computers, and if it fails periodically it could be a big problem.

One last note. I think the hanging updater.exe on my computer may have been caused by using the installation procedures for installing the updater.exe as a service for AI 10.2 after upgrading to AI 10.5.1. I noticed that the help files had some significant differences in how to install the updater.exe as a service when upgrading from AI 10.2 to 10.5.1, but there was no notification to me when I upgraded the project that I should fix anything. Ideally the newer version of AI could tell me that the process has changed and then ask me if I want it to fix it for me. At a minimum it would have been helpful if it notified me that something had changed, and that I needed to make some modifications.

Thanks,
Jeff
vbjeff
Posts: 23
Joined: Tue May 14, 2013 3:08 pm

Re: Auto Updater msi file not downloading

After calling the updater from my service and not installing the updater as a service, it fails about 70% of the time. I have 10 test computers and only 3 updated properly, the remaining 7 computers have an updater.exe process that was running from the C:Windows\Temp\... folder. I manually installed an update on the 10 computers that stopped running the updater.exe as a service, I then made a another newer update and tried to update all 10 computers, which did not work on most computers.

How can I tell what failed any why the updater.exe process is locked up?
vbjeff
Posts: 23
Joined: Tue May 14, 2013 3:08 pm

Re: Auto Updater msi file not downloading

After further testing, I found the problem was not selecting the "Delete update package file after installation" option in the Update project.

If the old msi file was not deleted, the updater would not overwrite the file and try to run the old msi file. I think that running the install for the same version that was installed was trying to bring up the dialog to repair/remove the install. Since the install was in silent mode and was run from a service (SYSTEM account) no dialogs show up on the screen, and would cause the updater.exe process to hang. The only way to then get it working again was to manually delete the old msi package and terminate the updater process.

I am guessing that the reason the msi did not get overwritten is because my program is installed as a service and the SYSTEM account was not given the proper privileges?? The problem will start to show up after the second update is made available.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater msi file not downloading

Hello Jeff,

First of all I apologize for my late reply. We had a couple of days off here.
When the updater determines that it needs to update the program, does it then copy itself to a Temp folder, and then the updater in the Temp folder is started and downloads the .msi file?
Yes, this is our default implementation.
One last note. I think the hanging updater.exe on my computer may have been caused by using the installation procedures for installing the updater.exe as a service for AI 10.2 after upgrading to AI 10.5.1. I noticed that the help files had some significant differences in how to install the updater.exe as a service when upgrading from AI 10.2 to 10.5.1, but there was no notification to me when I upgraded the project that I should fix anything. Ideally the newer version of AI could tell me that the process has changed and then ask me if I want it to fix it for me. At a minimum it would have been helpful if it notified me that something had changed, and that I needed to make some modifications.
Indeed, the configuration settings for installing updater as a service have been changed in our last versions of Advanced Installer. We'll try to add a notification regarding this scenario in a future version of Advanced Installer, thank you for your suggestion.
After further testing, I found the problem was not selecting the "Delete update package file after installation" option in the Update project.

If the old msi file was not deleted, the updater would not overwrite the file and try to run the old msi file. I think that running the install for the same version that was installed was trying to bring up the dialog to repair/remove the install. Since the install was in silent mode and was run from a service (SYSTEM account) no dialogs show up on the screen, and would cause the updater.exe process to hang. The only way to then get it working again was to manually delete the old msi package and terminate the updater process.

I am guessing that the reason the msi did not get overwritten is because my program is installed as a service and the SYSTEM account was not given the proper privileges?? The problem will start to show up after the second update is made available.
Indeed, this is a possible scenario if you are using the same name for your updates items added in the "Updates" page of your updates configuration project. Please keep in mind that it is mandatory to use a unique name for each update item added in the "Updates" page of your updates configuration project. The updater downloads the updates to the path specified in the "Updater page -> Downloads updates in this folder" field. Also, the MSI update package is downloaded (at the above path) to a sub-folder having the same name as the corresponding update item added in the "Updates" page of your updates configuration project.

Also, as another solution you can enable the "Delete update package file after installation" option for all of your updates file.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vbjeff
Posts: 23
Joined: Tue May 14, 2013 3:08 pm

Re: Auto Updater msi file not downloading

Thanks Daniel, I was not aware that I could have multiple updates saved in an updates project. I was simply reusing the same update but changing the version number each time. Each update that I create for my project should always replace any older versions. Would you recommend keeping each update in the updates project, or reuse the same update while updating the information?

Since I was including the checksum information in my update file, I thought that the updater would verify that the correct msi file was downloaded before using it (not just use the file name). If the chechsum did not match I thought it would delete the old msi file and download the current one, but I guess this is not how it works.

Thanks,
Jeff
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater msi file not downloading

Hello Jeff,

Please keep in mind that is not recommended at all to reuse an existing update item from "Updates" page for a new update version. If you don't want to keep all previous updates versions in your updates confguration project you can proceed like this:
- open your updates configuration project and on "Updates" page add a new update item, with a different name than existing one(s), for your new update version
- delete the previous update item(s) from "Updates" page
- build your updates configuration project

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vbjeff
Posts: 23
Joined: Tue May 14, 2013 3:08 pm

Re: Auto Updater msi file not downloading

Is it considered ok to duplicate an update, and then delete the old one?
I don't want to lose my settings each time I have a new update.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater msi file not downloading

Hello Jeff,

Yes, this is fine as long as the new update has a different name than the old one.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vbjeff
Posts: 23
Joined: Tue May 14, 2013 3:08 pm

Re: Auto Updater msi file not downloading

Thanks Daniel. Would it also be ok to rename the update (including the version number in the name) to make sure it is unique?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater msi file not downloading

You're welcome Jeff. Yes you can append the product version value to your update name.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vbjeff
Posts: 23
Joined: Tue May 14, 2013 3:08 pm

Re: Auto Updater msi file not downloading

Just to make sure I am doing this properly, it should be ok for me to reuse an existing update in an update project provided that I rename the update to a name that has not been used before and change the version numbers to the new values. Is that correct? If I always want an update to replace a previous version, is there any reason I may want to have more than one update in the update project?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Auto Updater msi file not downloading

Hello,
Just to make sure I am doing this properly, it should be ok for me to reuse an existing update in an update project provided that I rename the update to a name that has not been used before and change the version numbers to the new values. Is that correct?
Yes, this is a valid approach.
If I always want an update to replace a previous version, is there any reason I may want to have more than one update in the update project?
No, you can use only an update (pointing to your last released version) if you want that all previous versions to be upgraded only to your last released version. However, if you want the user to have ability to choose the update version, then you should add an update item for every released version.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”