Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Tracking ClickOnce User Updates
 

Tracking ClickOnce User Updates

We have an application that is deployed with ClickOnce.

For the initial download, they download the executable afterlogging into a website. When they log in, we write a record to the database of who logged in, when, and what version of the software they downloaded. This way, when a Customer calls with an issue, we can look in the database and quickly see what they are running.

How can we track the ClickOnce updates?

We want their applications to auto-update whenever we push a new version out there, but at the same time we'd like to be able to record what they got and when they got it.

How can we do this? Would we need to abandon ClickOnce to get this ability?

Using VS2008
Avoid Sears Home Improvement
  • Moved byYiChun ChenMSFTMonday, September 07, 2009 9:36 AMDeployment issue (From:Visual Studio Setup and Installation)
  •  
jp2msft  Saturday, September 05, 2009 5:26 AM

When the user runs your product, you could call a web service that you set up to send up the version the user is running, and update the database with the version and the last date/time the user ran it (i.e. current date/time).

If you only want to track it when the user performs updates, you can check the IsFirstRun property of the ApplicationDeployment; it is true when the user installs the application or installs an update.

If (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
{
ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
if (ad.IsFirstRun)
//user just installed it, or got an update
}

RobinDotNet


Click here to visit my ClickOnce blog!
  • Marked As Answer byjp2msft Monday, September 07, 2009 6:43 PM
  •  
RobinDotNet  Monday, September 07, 2009 5:41 PM
Hi Jp2msft,

I am moving this thread from Base "Visual Studio Setup and Installation" forum to the "ClickOnce and Setup & Deployment Projects" forum, since the issue is related to deployment. There are more deployment experts in the "ClickOnce and Setup & Deployment Projects" forum.

Thanks
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
YiChun Chen  Monday, September 07, 2009 9:36 AM

When the user runs your product, you could call a web service that you set up to send up the version the user is running, and update the database with the version and the last date/time the user ran it (i.e. current date/time).

If you only want to track it when the user performs updates, you can check the IsFirstRun property of the ApplicationDeployment; it is true when the user installs the application or installs an update.

If (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
{
ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
if (ad.IsFirstRun)
//user just installed it, or got an update
}

RobinDotNet


Click here to visit my ClickOnce blog!
  • Marked As Answer byjp2msft Monday, September 07, 2009 6:43 PM
  •  
RobinDotNet  Monday, September 07, 2009 5:41 PM
Thank You YiChun,

I was not aware of this part of the forum.
Avoid Sears Home Improvement
jp2msft  Monday, September 07, 2009 6:43 PM
Thank you, Robin!

This could be exactly what we need.
Avoid Sears Home Improvement
jp2msft  Monday, September 07, 2009 6:43 PM

You can use google to search for other answers

Custom Search

More Threads

• Unable to create test certificate
• Installation problem
• Creating wrapper installer
• How to register DLL via setup/installer
• VS 2003 windows service uninstallation failing
• System.Deployment.Application.DeploymentException (ManifestSemanticValidation)
• RemovePreviousVersions is not adding entry to Upgrade table
• MSI not in Add/Remove Programs
• How to start the application when a Checkbox is ticked?
• RemotingConfiguration.Configure not working with Smart Client in V1.1