Results 1 to 11 of 11

Thread: Application Installation

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2016
    Posts
    41

    Application Installation

    I developed a VB.net application. Around 10 people using it from different regions. Database is centralized. My issue is : each time I make some correction in my application, I need to individually call all these 10 people to update it in their system. I find it a bit difficult. Any idea to simplify my task ?

  2. #2
    Member
    Join Date
    Aug 2018
    Location
    France, North
    Posts
    61

    Re: Application Installation

    Hi, personnaly I'm using that, you need to call it from the form load, it check if you have done an update and restard with the new version !

    VB.NET Code:
    1. Private Sub InstallUpdate()
    2.         If ApplicationDeployment.IsNetworkDeployed Then
    3.             Dim updateAvailable As Boolean = False
    4.             Dim ad As ApplicationDeployment = ApplicationDeployment.CurrentDeployment
    5.  
    6.             Try
    7.                 updateAvailable = ad.CheckForUpdate()
    8.             Catch dde As DeploymentDownloadException
    9.                 'MessageBox.Show("The application cannt check for the existence of a new version at this time. " & vbLf & vbLf & "Please check your network connection, or try again later. Error.")
    10.                 'MessageBox.Show("Un problème est apparu, l'application va redémarer afin de terminer la recherche de mise à jour." & vbLf & vbLf & "Si le problème persiste, vérifiez votre connexion internet ou réessayez plus tard. Error.")
    11.                 Application.Restart()
    12.                 Return
    13.             Catch ide As InvalidDeploymentException
    14.                 MessageBox.Show("The application cannot check for an update. The ClickOnce deployment is corrupt. Please redeploy the application and try again. Error: " & ide.Message)
    15.                 Return
    16.             Catch ioe As InvalidOperationException
    17.                 MessageBox.Show("This application cannot check for an update. This most often happens if the application is already in the process of updating. Error: " & ioe.Message)
    18.                 Return
    19.             End Try
    20.  
    21.             If updateAvailable Then
    22.                 Try
    23.                     ad.Update()
    24.                     MessageBox.Show("L'application a bien été mise à jour! Elle va maintenent rédémarrer.", "Update", MessageBoxButtons.OK, MessageBoxIcon.Information)
    25.                     Application.Restart()
    26.                 Catch dde As DeploymentDownloadException
    27.                     MessageBox.Show("Cannot install the latest version of the application. Either the deployment server is unavailable, or your network connection is down. " & vbLf & vbLf & "Please check your network connection, or try again later. Error: " & dde.Message)
    28.                 Catch tnge As TrustNotGrantedException
    29.                     MessageBox.Show("The application cannot be updated. The system did not grant the application the appropriate level of trust. Please contact your system administrator or help desk for further troubleshooting. Error: " & tnge.Message)
    30.                 End Try
    31.             End If
    32.         End If
    33.     End Sub

  3. #3
    Member
    Join Date
    Aug 2018
    Location
    France, North
    Posts
    61

    Re: Application Installation

    I had the same issue one day and I find this code, I put some message box in French, but the main purpose is here

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2016
    Posts
    41

    Re: Application Installation

    @ Mac. This is the first time I put a windows application with a centralized server. So I need to learn and acquire more information about the Internet deployment you have mentioned. Can you show some source ?

  5. #5
    Member
    Join Date
    Aug 2018
    Location
    France, North
    Posts
    61

    Re: Application Installation

    I'm sorry, for now I just code some little application for my work and each time, it was on a local server.
    If you need something else for internet I don't really know, but I though this method could work.
    (For me this is just a radio button to check in your project properties )

    Maybe this link will help you :
    https://docs.microsoft.com/en-us/vis...n?view=vs-2019

  6. #6
    Member
    Join Date
    May 2018
    Posts
    41

    Re: Application Installation

    Why not have the version number on a table and allow the app to check that it is the current version.

  7. #7
    Member
    Join Date
    Aug 2018
    Location
    France, North
    Posts
    61

    Re: Application Installation

    I think this is more complicated to do that , here we check directly in the deployment folder if the version has change. But this will do the job too I guess

  8. #8
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,754

    Re: Application Installation

    Quote Originally Posted by ragavendran View Post
    @ Mac. This is the first time I put a windows application with a centralized server. So I need to learn and acquire more information about the Internet deployment you have mentioned. Can you show some source ?
    What has worked for me is to check for new version when the app is started and then notify the user that the app will update when closed. I have the app check for updates after the app starts every time. This works well.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  9. #9
    Frenzied Member
    Join Date
    Dec 2014
    Location
    VB6 dinosaur land
    Posts
    1,191

    Re: Application Installation

    Quote Originally Posted by SamCam15 View Post
    Why not have the version number on a table and allow the app to check that it is the current version.
    +1. This is how many major software vendors seem to do it (assuming you have allowed their auto-update process to be enabled). We personally dislike the click-once deployment so this is how the one program we have that is used by multiple salesreps is done. Each time they run it checks for an update and asks if the user wants to install it if one is present.

  10. #10
    Member
    Join Date
    Aug 2018
    Location
    France, North
    Posts
    61

    Re: Application Installation

    The cool thing with my first post is that I'm sure users will use the last version of the application because it update itself before the launch of the first form.

  11. #11
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: Application Installation

    ClickOnce does the update check and the update automatically, but it does require that the application be published to a site and installed from the site (URL) so that the application knows where to check for updates. I have a few applications like that. When I publish a new version, that's all I do. The next time the user opens the application, they get the update automatically.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width