Solved

.NET - Clickonce Update Application, Add "Whats New" Popup

Posted on 2013-11-15
3
515 Views
Last Modified: 2013-11-21
i have a Clickonce application. It posts to an internal server.
if there is a new version, The client applications are asked to update every time the open the program.

I need a form to open with latest changes, or whatever, ONCE after EVERY update, for EACH user

Any Suggestions?
0
Comment
Question by:Ess Kay
3 Comments
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 250 total points
ID: 39652982
Start the application in a Main method instead of starting it directly in a Form.

Store the current application version somewhere, either in the settings of the application, in a file, in the registry, you name it.

When the application starts, it checks its own version number against the stored number.

If they do not match, then this is an update. In such a case, show the update form with ShowDialog and store the new version number for the next run. When the user closes the update form, display the application startup form.

If the version of the application and the stored version match, then the update form has been displayed once. Simply skip it and go straight to the application startup form.
0
 
LVL 13

Accepted Solution

by:
jonnidip earned 250 total points
ID: 39655566
You can use this ClickOnce method that shows you if the current deploy has just been installed (so, only on the first run of every update). I am using it to clear local cache when a new update is installed (because the previous cache can contain differences from the actual objects).
System.Deployment.Application.ApplicationDeployment.CurrentDeployment.IsFirstRun

Open in new window

You can simply check it and show your changes file if the value is "true".

Regards.
0
 
LVL 15

Author Closing Comment

by:Ess Kay
ID: 39665813
johnnidip - easiest, but i dont know if it will work if there are multiple users.
james - did not provide details, but ive done something similar which worked.

I save to an xml file onClose, then load it for setting every onLoad of main form.
in the onLoad of my MAIN MDI file, i call this function




  'Whats New
    Public Sub whatsNew()
        Dim assembly__1 As Assembly = Assembly.GetExecutingAssembly()
        Dim fvi As FileVersionInfo = FileVersionInfo.GetVersionInfo(assembly__1.Location)
        Dim version As String = fvi.FileVersion
        If Me.m_Version = version Then
            'No news
        Else
            Me.m_Version = version
            'open whats new
            Dim F As New frmWhatsNew
            F.MdiParent = Me
            F.Show()
        End If
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question