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!

codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

updater justdownload

This is my c# code to use the justdownload command

private string AutoUpdaterJustDownload()
{
Process process = Process.Start(_updaterPath, " /silentall -nofreqcheck -justdownload -url http://mydeploymentsite.com/myapp.msi");
process.WaitForExit();
string updatestatus = process.ExitCode.ToString();
process.Close();

return updatestatus;
}

The exit code is 0 if it finds the updated file and the process does not wait for its exit. It also brings up the download UI minimized. I thought /silentall would prevent the UI from showing up and I'd get a return code of 0 after the file was finished downloading. I'd like to download it in the background and prompt the user to update once the download is done. Is there a way to see if the update is done?

Also, my server txt file shows 2 versions, the current version and the new version. When the download UI shows, it always shows 2 files, but there is only 1 msi. We do not plan to have multiple versions available, we keep all clients on the same version. Is it best to create the update file to only ever have the most current version in it?

Is there a way to launch to download UI with the buttons disabled?

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

Re: updater justdownload

Hello Scott,
The exit code is 0 if it finds the updated file and the process does not wait for its exit. It also brings up the download UI minimized. I thought /silentall would prevent the UI from showing up and I'd get a return code of 0 after the file was finished downloading. I'd like to download it in the background and prompt the user to update once the download is done. Is there a way to see if the update is done?
Please note this is the normal behavior. When the updater is launched if finds updates it copies itself in a temporary location and start downloading updates (using another process). For your scenario we recommend to start the updater with a command line like this:

Code: Select all

updater.exe /checknow
later (e.g. when the user close your application).

If you want to wait and detect when the updater finishes downloads you can integrate it within your application as it is described in our "Wait for updater" article, but this is a little more complicated.

Also, please keep in mind that the -url switch it is used to overwrite the URL of the Updates Configuration File from your server, and not the URL of your upgraded package.
Also, my server txt file shows 2 versions, the current version and the new version. When the download UI shows, it always shows 2 files, but there is only 1 msi. We do not plan to have multiple versions available, we keep all clients on the same version. Is it best to create the update file to only ever have the most current version in it?

Is there a way to launch to download UI with the buttons disabled?
I'm afraid I don't fully understand what you mean. Can you please give us more details about your scenario (maybe exemplify)?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
codemonk3y
Posts: 62
Joined: Thu Nov 01, 2012 3:51 pm

Re: updater justdownload

I think I figured out the multiple downloads showing up issue. It only happens on my development box, so I think it something with the way VS does the version.

Thanks, that explains why the process doesn't wait.

I rebuild my client msi, my config file and my deployment site. When I'm on my machine and run the updater, it downloads the file but then gives me the MD5 error. Everything was just rebuilt, why am I getting this error?

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

Re: updater justdownload

Hello Scott,

This may happen if you have a different update package on your server than the update package used to create the updates configuration project. In this case the update package integrity check will fail. However, can you rebuild your update package (and upload it on your server) and, then rebuild the updates configuration project (and upload the updates configuration file on your server) and see if the behavior still persist?

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

Return to “Building Installers”