Problem with Updater Scheduled Task using checknow - 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!

tipg
Posts: 3
Joined: Tue Jan 19, 2010 11:58 pm

Problem with Updater Scheduled Task using checknow

I'm having trouble with getting the Updater to work as a scheduled task using the /checknow command line argument. If I take the same project and only change the command line parameter in the scheduled task configuration from /checknow to /silentall the scheduled task executes perfectly and my program is updated. If I install my program and then run the updater from a shortcut (either installed with the program or manually via the command prompt) using the /checknow argument, it also executes perfectly. I get the message letting me know that an update is available and it allows me to download and install it.

What happens when I try to run the scheduled task is that the task will execute and finish. If I check the Scheduled Task logs, I get the following:

"Updater.exe.job" (Updater.exe)
Started 6/23/2010 4:25:50 PM
"Updater.exe.job" (Updater.exe)
Finished 6/23/2010 4:25:58 PM
Result: The task completed with an exit code of (0).

However, the updated MSI file is not downloaded and therefore my program is not updated - check the downloads folder specified in the Updater configuration and only the aiu file exists. If I check the log files on my web server, I can verify that the Updater is getting the updates.txt file, but it does not try to get the updated MSI.

After running the scheduled task with the /checknow argument, if I check the Windows Task Manager processes, I can see that the Updater is still running under the SYSTEM username, but it is not using any CPU resources and seems to just be stuck. If I rerun the scheduled task, another Updater process will spawn and finish with the same results. If I try to run the Updater (either via the shortcut or command line), I now get a Windows error saying that the Advanced Updater has encountered a problem and needs to close and then a Dr. Watson message pops up. If I kill the Updater process that is stuck and then try to run the Updater (either via shortcut or CLI), it runs perfectly again.

Any ideas on what could be causing this problem?

P.S. If it makes a difference, I was using 7.3.1 when I encountered the issue. I also updated to 7.7 in hopes that it would help, but it didn't.

Thanks.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Problem with Updater Scheduled Task using checknow

Hello,

What I believe happens is this:
- scheduled tasks run under the local SYSTEM account because they are actually done by the scheduled task service
- as you may know, services are not allowed to display any user interface.
- the /checknow option for the updater will display a dialog message informing of updates, which is blocked because it is being run by a service. Now, the updater displays the dialog and waits for user input but the interface is being blocked so the updater is stuck waiting for input.

Thus, as a scheduled task, the updater should only be run in silent mode, with no UI.
Our guide on updater's command line options should help you decide which command line is appropriate. I suggest the /silentall option

Let me know if this helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
tipg
Posts: 3
Joined: Tue Jan 19, 2010 11:58 pm

Re: Problem with Updater Scheduled Task using checknow

Gabriel-

Thanks! That makes sense and explains why the process hangs. You may want to include that little tidbit of information on the "updater's command line options" page.

Since that option doesn't work, maybe you can provide an alternative solution for my problem:
I do not have access to the source code of the application being deployed, so integrating the updater into the application is not an option. I want to be able to automatically check for updates (at restart if possible) and prompt the user only when there is a download available - other than that it should be silent. The user may have limited privileges (not an administrator) on the workstation so I'd like to be able to launch the updater as a privileged user. Lastly, there should only be one version of the program installed on the workstation, so side-by-side installations are not an option.

Running the updater as a scheduled task using the /silentall argument technically works, but here's my problem with this option:
The new update is roughly 30MB and will take a while to download to the workstation. Since the user is unaware that an update is taking place, they may launch the currently installed version of the program. When the download completes, the current version will be uninstalled before the new version is installed. The problem is that the user may still have the program running which will result in it crashing - from the user perspective this crash will be for no apparent reason.

Any insight you can provide would be greatly appreciated.

Thanks.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Problem with Updater Scheduled Task using checknow

Hello,

Upon further investigation I realized I was wrong. The Task Scheduler may be a service but the Updater should still run as a normal program thus be able to display a user interface.
So I did a check on my own system, manually created a scheduled task that launched the updater with the /checknow command. It launched fine, and displayed the "your software is up to date message" as expected.

I'm not sure why the updater hangs on your system. Would it be possible for you to send us a sample project that accurately reproduces this behavior to support at advancedinstaller dot com so we can further investigate the issue?

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”