Updater issues - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

janalphenaar
Posts: 18
Joined: Thu Jul 31, 2008 8:47 am

Updater issues

Hi,

For a customer, I am currently testing Advanced Installer version 7.2.1, just downloaded from the website.

What I am trying to accomplish is to setup an MSI with an auto updater function so I can install updates without my users having to do (and see) anything. This implies that no windows should pop up during the installation of the new update. The idea is that my program automatically triggers “updater /silentall” at startup to install the latest version, though I am not sure if this is the correct approach.

The web server has an updates.txt file, containing the option “CommandLine = /qn” to get rid of all interactive windows, this works.

Now I am stuck with several errors.

1) The installation is silent and successful, but after installation I get an error message in my TaskTray saying “Error: Update installation failed” while the installation itself was successful.
2) After publishing a new version on the website and moving the clock 2 days into the future I execute a new “updater /silentnow”, it will not do anything. Only after removing the “C:\Documents and Settings\Administrator\ApplicationD Data\Your Company” folder I can successfully execute a new update. Why does Advanced Installer leave this folder on the system?
3) Even if there is no new update available “updater /silentnow” installs the same version again, consuming unnecessary bandwidth.[/list]

If anyone can help me out with these errors, I would really appreciate it.

Regards,

Jan
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Updater issues

Hi Jan,

Thank you for your interest in Advanced Installer.
1) The installation is silent and successful, but after installation I get an error message in my TaskTray saying “Error: Update installation failed” while the installation itself was successful.
This could be caused by the fact that in the Updates Configurations project, under the Install Detection group the condition was not set correctly.
This condition should be false when an update is available and true after the update installation has finished.
2) After publishing a new version on the website and moving the clock 2 days into the future I execute a new “updater /silentnow”, it will not do anything.
If you want to test the update you can set any value in the Updater page, under the "Check for updates every" edit box, then build the package. After this you can edit manually the "updater.ini" file and set the check frequency to 0.
Only after removing the “C:\Documents and Settings\Administrator\ApplicationD Data\Your Company” folder I can successfully execute a new update. Why does Advanced Installer leave this folder on the system?
This path will contain the updates downloaded by the Updater. If an update is already downloaded, but not detected as installed (because of an incorrect detection criteria for example), the update is installed directly from this folder.
3) Even if there is no new update available “updater /silentnow” installs the same version again, consuming unnecessary bandwidth.
The cause of this event is the same Install Detection group from the first question. Its purpose is to check the version or size of a file and decide if the update is required. If the specified file
doesn't has that file version for example then the update will proceed, otherwise not. After updating the file should have the new version and now updates will be required.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janalphenaar
Posts: 18
Joined: Thu Jul 31, 2008 8:47 am

Re: Updater issues

Hi Bogdan,

Thanks for helping me out, this is my updates.txt on the webserver.

Code: Select all

;aiu;

[Your Application]
Name = Your Application
URL = http://testserver/download/test.msi
Size = 4159488
RegistryKey = HKLM\Software\Your Company\Your Application\Version
Version = >= 1.0.7
CommandLine = /qb
When I execute “updater /checknow” update 1.0.7 installs perfectly. But when there is a new patch available (1.0.8) on the website and I update again, I get an “Error: Update installation failed”, “Some of the updates failed to install properly”. Also the MSI file is in “C:\Documents and Settings\Administrator\Application Data\Your Company\Your Application\updates\Your Application”, is this the way it should be ?

Warm regards,

Jan
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Updater issues

Hi Jan,
I get an “Error: Update installation failed”, “Some of the updates failed to install properly”.
This error appears because you are not making the correct settings in the Install Detection group from the Updates Configurations project.
From what I can see in the .aiu file you've posted you have a mistake in the following line:

Code: Select all

Version = >= 1.0.7
This line should look like this:

Code: Select all

Version  = 1.0.7
Also the MSI file is in “C:\Documents and Settings\Administrator\Application Data\Your Company\Your Application\updates\Your Application”, is this the way it should be ?
In the Updater page from the main project you will find an edit box called "Downloads Folder". Here it is written the path were your update should be downloaded.

Please let me know if you have other questions.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janalphenaar
Posts: 18
Joined: Thu Jul 31, 2008 8:47 am

Re: Updater issues

Hi Bogdan,

Are you sure? This line comes from the Advanced Installer manual and works exactly as described…

As far as I know “Version = >= 1.0.7” means, install the update from the website if the version is bigger or equal then version 1.0.7 currently installed on the PC.

I will try your setting anyway in a few hours and post the outcome in this forum.

Thanks

Regards,

Jan
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Updater issues

Hi Jan,

Yes you are correct, I missed that. However, the Install Detection criteria you are using is incorrect, this is why you are receiving the error message.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janalphenaar
Posts: 18
Joined: Thu Jul 31, 2008 8:47 am

Re: Updater issues

Hi,

What do you mean when you say the Install Detection criteria are incorrect? The update installs fine the first time. The second time I receive an error message and I have no idea why, nor is Advanced Installer giving me any information.

Even the Version line/registry settings are behaving correctly. I have a strong feeling that the directory from where Advanced Installer is installing the update should have been cleaned after the update is installed (which is not happening in my case). This could well be the reason for Advanced Installer failing the second time it wants to do an update.

Could this be a bug?

Regards,

Jan
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Updater issues

Hi,
What do you mean when you say the Install Detection criteria are incorrect? The update installs fine the first time.
The condition you've set in the Install Detection group is used by the updater to detect if a newer version is available. If available it downloads and installs it.
After the installation the updater checks again for the condition from the Install Detection group. If the condition is met, then the application was updated
successfully, otherwise you receive the error message and the update is still available. This is why I said that the condition from the Install Detection you are using is the problem.

An easy way to test the usage of Install Detection group is using registry keys to detect if an update is necessary or not:

-- in the original installation package you create a registry entry which contains the version of the package (you can use the ProductVersion property)
-- in the "Installed Detection" section of the Updates configuration project use this registry value as a detection criteria
-- you set the version of the update package as the additional criteria

This way the Updater will verify which version of the package is installed.
Could this be a bug?
This is not a bug. That folder is deleted when the application is uninstalled, not when update has finished.

Please note that the following line in the updates configuration file is a unique identifier:

Code: Select all

[Your Application]
Therefore this line should not appear in other updates.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
janalphenaar
Posts: 18
Joined: Thu Jul 31, 2008 8:47 am

Re: Updater issues

Hi Bogdan,

The fact that [Your Application] needs to be unique for each update did the trick. Now everything seems to works as expected.

To keep this thread complete, this is my updates.txt:

Code: Select all

;aiu;

[Your Application Version 1.0.25]
Name = Your Application
URL = http://testserver/download/test.msi
Size = 4186624
RegistryKey = HKLM\Software\Your Company\Your Application\Version
Version = >= 1.0.25
Flags = SilentInstall
CommandLine = /qn
Thanks for your support and patience.

Regards,

Jan
janalphenaar
Posts: 18
Joined: Thu Jul 31, 2008 8:47 am

Re: Updater issues

Hi,

Just another question regarding the update feature of Advanced Installer.

From my GUI it all works as expected. Now I moved the call to updater.exe from my test gui to a windows service. Unfortunately any new updates are not installed. Because I do not have any logs, I have no idea why it is failing.

Is it even possible to call updater.exe from a windows service?

Regards,

Jan
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Updater issues

Hi Jan,

I'm afraid this is not supported by the updater.

You could try using the command line options "/silentall" or "/silentcritical" and call the updater using a Windows service.
These options might work because no user interaction is required, but if an error occurs the updater will say it is an command line error.

My recommendation would that instead of using a Windows service, you could try to run the updater as a Scheduled Task. This can be done from the "Updater" page of Advanced Installer.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”