Dennis van der Stelt

I care about technology; I care about users more

Community

Email Notifications

News

  • Addicted to Refactor! Pro
    <div class="sideNavItems">

I read...

I Use...

Tags

Recent Posts

Archives

Blog Subscription Form

  • Email Notifications
    Go

Turn off automatic updates with ClickOnce

I got an e-mail with the question how to turn off automatic checking for updates, when you're doing a manual check for updates with ClickOnce. Strangely enough I forgot to mention this in my previous article.

ClickOnceAutoUpdateOff

The above dialog window can be obtained in the properties window of your project (Right-click your project in the solution explorer), under the "Publish" tabpage, using the "Updates..." button.

In the above window the "The application should check for updates" is turned on. Uncheck it and your application won't automatically check for updates anymore.

Note that at the bottom, I've filled in the update location. For some reason, when you deploy your application with auto update turned off, it won't be able to find the update location anymore. It's being removed from the manifest! I have no idea if this is a bug or not, but it can be solved by entering the update location in the bottom textbox. Now the manual check for updates with ClickOnce works again.

Technorati Tags:

Comments

Manual check for updates with ClickOnce - Dennis van der Stelt said:

Pingback from  Manual check for updates with ClickOnce - Dennis van der Stelt

# February 4, 2008 1:47 PM

Jeroen de Zeeuw said:

Hi,

I was googling for a solution for the problem as described in the referenced article, concerning the "Launching Application" dialog.

Indeed, when un-checking the "The application should check for updates" check, the dialog is supressed until I call the CheckForDetailedUpdate() method in the ApplicationDeployment class. If I choose not to update the application, the dialog is back when restarting the application.

Is this a bug or am I missing something here?

However, nice walkthrough!!

Jeroen.

# February 14, 2008 12:37 PM

fmonroy said:

Hello Jeroen de Zeeuw, I've the same problem. It behaves like a bug.

Did you find a workaround?

# March 17, 2008 8:14 PM

turn off automatic update notifications said:

Pingback from  turn off automatic update notifications

# June 4, 2008 10:47 PM

Joe said:

I struggled with this for a while before finally figuring out what was going on.  The CheckForUpdate() and CheckForDetailedUpdate() methods persist the results of the update check to disk.  The next time the application runs, the ClickOnce mechanism sees that an update is available and prompts the user with the unwanted window.  Apparantly the update is a two step process.  Step 1 - Check the deployment location for updates and persist the information about what it finds to the local ClickOnce update cache.  Step 2 - Check the local ClickOnce update cache and prompt the user with the update window if there an update is indicated.  Unchecking "The application should check for updates" option seems to only cause ClickOnce to skip step 1.  Step 2 still occurs.  The CheckForUpdate() and CheckForDetailedUpdate() methods have the same effect as step 1 - the data is persisted to disk, so the next time the application is run, Step 2 sees the update and displays the update window.  The trick is prevent CheckForUpdate() and CheckForDetailedUpdate() from persisting this information to disk.  This can be done by useing the parametered overload (CheckForDetailedUpdate(persistUpdateCheckResult)) and set the parameter to false (CheckForUpdate(false) or CheckForDetailedUpdate(false)).  The MSDN documentation for the persistUpdateCheckResult is weak at best and doesn't explain this at all.

# December 10, 2008 4:51 PM

kazoolist said:

@Joe - thank you for explaining that persistUpdateCheckResult parameter. You are right that the MSDN documentation is weak at best. Fortunately a Google search led me to your comment and that makes a lot more sense now!

# December 20, 2009 4:39 AM

Arafath said:

Its really helpful to me...Please spread out this information...lot of people asking the same question in the internet.

# February 23, 2010 6:10 PM

Dennis van der Stelt said:

I’ve written some tutorials in the past to help people with manually updating their ClickOnce deployed

# February 24, 2010 4:42 PM

Kumaran said:

What you said works, but i have another issue.  After all the check, when the actual update is happening and if the update fails because of network issues, next time when you open the application, the update window is coming again.

# April 23, 2010 12:09 AM

Dan said:

@Joe

Holy crap, thanks for pointing that out. This was driving me nuts.

# May 4, 2010 12:43 AM

GretaSUTTON said:

Make your life time more simple take the <a href="http://bestfinance-blog.com">loan</a> and all you want.

# November 17, 2010 10:28 PM

Jose Carlos Eys said:

We have the same problem with update dialog "Update/Skip" even with the "Check for updates" option unchecked.

We put the CheckForUpdates(False) lines at the beginning of our application (huge application) but it continues sending the dialog.

To find out where is the right place to put the lines, we put a messagebox right before this lines, but when we saw that first put the update dialog and then the messagebox.

Where I have to put it on? Is there a special generated code wrapping the application, and there is the right place to put the overload?

Desperate. Jose.

# February 13, 2011 4:20 PM

Dennis van der Stelt said:

I'm not really sure what you mean. But when you turn off checking for automated updates, it shouldn't check for them anymore. Period.

Of course, don't forget that it'll take an update of the client for these settings to transfer. So test it by updating at least 2 times after setting this option.

And make sure you don't have an automated build or so that simply turns it on again! :)

This worked for me like a charm.

# February 14, 2011 8:39 AM

Art Colman said:

Thanks for the information. I had a problem with my unchecking of the "check for updates" box not being retained, enven though I did set an update location, as suggested. I found that I had to execute the publish process via the Publish Now button, using the wizard either from the publish page or from the menu caused the box to be automaticlly rechecked.

# June 13, 2011 9:46 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Please add 6 and 5 and type the answer here: