Schedule Task not updating second time. - Advanced Installer Community
not_kms
Posts: 4
Joined: Fri Jun 14, 2013 4:28 pm

Schedule Task not updating second time.

I have a schedule task via advanced installer.
Everything seems to work fine, by that, I mean, it executes the scheduled task at the specified interval, it runs the advanced installer config exe, which pings my server, reads the txt file, realizes that there is a difference in the registry on the system, and proceeds to install the .msi that is on the server.

After installation, it gives me the message "Some of the updates failed to install properly".

I see from others noting this, that the common response is that the installation detection is incorrect.
This does not seem to be the case as it does recognize it needs an update, and proceeds to install the latest product.
After the installation is complete, I check task manager to see that there is no active process for the scheduled task... all seems good so far as I am waiting on a five minute interval for the scheduled task to execute again.
I proceed to build a new .msi (major upgrade from 3.0.0 to 4.0.0) and after that finishes building, I proceed to build next my config.txt file based off of that new .msi file.
I now have the latest .msi file and the latest config.txt file (the file that begins with " ;aiui; "
I throw both of these up on my server, and wait for the next scheduled task interval to execute and run the updater.exe file to kickstart everything to realize there is an update necessary now again.
But...nothing...happens.... it only executes the scheduled task once it seems.

I have three questions:
1) Why am I getting the "Some of the updates failed to install properly" error, though it seems my installation detection is functioning correctly...
2) Why is the scheduled task only running once? I have it set for 5 minute intervals, and made sure that it executes on that interval the first time, but it fails to execute after that...
3) I notice there is a checkbox for "Search 64-bit registry", if I check this, will it check both 32-bit and 64-bit registries? If not, how can I do so?

My environment:
I'm running this test bed on a virtual machine, Win7-32bit, the registry checkbox is NOT checked to have the "search 64bit registry", meaning, it should only search 32bit entries.

Any help would be great.

Thanks.
-Kyle
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Schedule Task not updating second time.

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.
1)Why am I getting the "Some of the updates failed to install properly" error, though it seems my installation detection is functioning correctly...
If after the update is complete you get that message, then you are using an incorrect detection criteria. This criteria is usually a file or a registry entry which contains the package version . Advanced Updater verifies this condition first to see if the update is already installed or not and after installation to see is the update was installed correctly. If not, it will prompt that message. Therefore, you need to make sure that you specified a correct file or registry entry in the Installed Detection section of the Update Properties tab.
2)Why is the scheduled task only running once? I have it set for 5 minute intervals, and made sure that it executes on that interval the first time, but it fails to execute after that...
In order to test you updater you can use a shortcut to the updater. You can go in the “Files and Folders” page and create it.
Please note that the CheckFrequency feature works like this:
- you integrate the Updater in your application and launch it when the application starts or you set the updater as a scheduled task
- when the Updater is launched (by your application or by the scheduled task) it must be launched with the/silent,/silentallor, /silentcritical parameters
You can take a look on our Auto Updaterarticle.
- now the check frequency is used
- if the check frequency has passed, when the updater is launched it checks for updates
- if the check frequency hasn't passed, when the updater is launched it does nothing
3) I notice there is a checkbox for "Search 64-bit registry", if I check this, will it check both 32-bit and 64-bit registries? If not, how can I do so?
Indeed, you can enable the “Search the 64-bit portion of the registry” option if you want to search in the 64-bit registry section, but will not search in the 32-bit register too.

If you have any more questions feel free to ask.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
not_kms
Posts: 4
Joined: Fri Jun 14, 2013 4:28 pm

Re: Schedule Task not updating second time.

In order to test you updater you can use a shortcut to the updater. You can go in the “Files and Folders” page and create it.
Please note that the CheckFrequency feature works like this:
- you integrate the Updater in your application and launch it when the application starts or you set the updater as a scheduled task
- when the Updater is launched (by your application or by the scheduled task) it must be launched with the/silent,/silentallor, /silentcritical parameters
You can take a look on our Auto Updaterarticle.
- now the check frequency is used
- if the check frequency has passed, when the updater is launched it checks for updates
- if the check frequency hasn't passed, when the updater is launched it does nothing
I already have a shortcut to the updater, and after running it manually, it continues to perform an update installation as expected.
I have faith that the actual execution works, what I don't have faith in, is the scheduled task and/or the installation detection criteria.
It is launched with the parameter: /silentall
I tick the checkbox "Do not use check frequency", so if that works, it shouldn't be part of the problem...

I think I've narrowed the problem down to the Scheduled task, and/or the installation detection criteria.

Since it seems that I would need to have two entirely different builds (one for searching 32bit registries, one for searching 64bit registries) if I continue to use Advanced Installer, I will need to change my installation criteria, because we need an "all-in-one" detection criteria.

I will update this thread if/after I find a solution, but I will need to change the installation detection criteria from registry search, to another means, and also try to find out why the scheduled task does not work a second time.

Thanks.
-Kyle
not_kms
Posts: 4
Joined: Fri Jun 14, 2013 4:28 pm

Re: Schedule Task not updating second time.

Ok, I'm fairly certain now that the reason it is not installing is because of the installation detection "failing".
After speaking with management, we agreed that it is ok to use the registry setting for installation detection.

So I am using the registry for installation detection.

After my scheduled task recognizes that an update is necessary via registry, it installs the new update from the server.

All is well so far.

I notice after the installation that the error remains "Some of the updates failed to install", despite it seeming to install properly.

Here is my setting for the registry installation detection:

Registry Value: HKEY_LOCAL_MACHINE\SOFTWARE\Company Inc.\Company Updater\Version
Expected Value: 3.0.0
(search 32-bit registry not checked)

running tests in Windows 7 32-bit Virtual Machine.

(by the way: the HKLM denotation does not seem to work, instead, I use "HKEY_LOCAL_MACHINE" and it works)

Any thoughts on why I am still getting this "some of the updates failed to install" error?
-Kyle
not_kms
Posts: 4
Joined: Fri Jun 14, 2013 4:28 pm

Re: Schedule Task not updating second time.

If I run the "Company Updater.exe" it recognizes there is an update and tries to continue with the installation...
So if the Company Updater exe is running fine manually, then the scheduled task is in question... it only seems to run once... any ideas?

-Kyle
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Schedule Task not updating second time.

Hi Kyle,

I'm not sure why you encountered this behavior.

I've attached a .zip file which contains a sample test project.

If you have any more questions feel free to ask.

Best regards,
Dan
Attachments
Updater-Sample.7z
(3.98 KiB) Downloaded 421 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”