Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > How to access auto updater in code?
 

How to access auto updater in code?

How do you hook the auto updater within an application? I wanted to add a "Check for updates" to the tool bar in my application and leverage the click once auto updater.

CAC90  Tuesday, September 13, 2005 5:47 PM

I'm assuming your application is ClickOnce deployed to begin with. If so you can use methods available in the System.Deployment.Application namespace to check for updates and download updates programatically from within your app.

For more info see:
http://msdn2.microsoft.com/en-us/library/ms136930(en-US,VS.80).aspx

Regards,
Sameer

Sameer Bhangar - MSFT  Friday, September 16, 2005 12:43 AM

I'm assuming your application is ClickOnce deployed to begin with. If so you can use methods available in the System.Deployment.Application namespace to check for updates and download updates programatically from within your app.

For more info see:
http://msdn2.microsoft.com/en-us/library/ms136930(en-US,VS.80).aspx

Regards,
Sameer

Sameer Bhangar - MSFT  Friday, September 16, 2005 12:43 AM

Something like this right?

System.Deployment.Application.ApplicationDeployment ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment;

ad.CheckForUpdate();

or

ad.CheckForUpdateAsync();


Thanks!

CAC90  Friday, September 16, 2005 1:22 AM

You can use google to search for other answers

Custom Search

More Threads

• Uninstall the application before installing using ClickOnce
• Custom Action runs from version being replaced
• ClickOnce in a password protected directory
• Forms Control not displaying in IE on XP
• Creating Subfolders and *Suites* when publishing apps.
• Framework Version
• Distribute "trust an assembly"
• Clickonce securtiy permissions to myDocuments
• Proxy authentication required 407
• Clickonce - Icon and size in add remove programs