-
Apr 15th, 2019, 06:14 AM
#1
Thread Starter
Member
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 ?
-
Apr 15th, 2019, 06:24 AM
#2
Member
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:
Private Sub InstallUpdate()
If ApplicationDeployment.IsNetworkDeployed Then
Dim updateAvailable As Boolean = False
Dim ad As ApplicationDeployment = ApplicationDeployment.CurrentDeployment
Try
updateAvailable = ad.CheckForUpdate()
Catch dde As DeploymentDownloadException
'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.")
'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.")
Application.Restart()
Return
Catch ide As InvalidDeploymentException
MessageBox.Show("The application cannot check for an update. The ClickOnce deployment is corrupt. Please redeploy the application and try again. Error: " & ide.Message)
Return
Catch ioe As InvalidOperationException
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)
Return
End Try
If updateAvailable Then
Try
ad.Update()
MessageBox.Show("L'application a bien été mise à jour! Elle va maintenent rédémarrer.", "Update", MessageBoxButtons.OK, MessageBoxIcon.Information)
Application.Restart()
Catch dde As DeploymentDownloadException
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)
Catch tnge As TrustNotGrantedException
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)
End Try
End If
End If
End Sub
-
Apr 15th, 2019, 06:30 AM
#3
Member
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
-
Apr 15th, 2019, 06:38 AM
#4
Thread Starter
Member
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 ?
-
Apr 15th, 2019, 06:56 AM
#5
Member
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
-
Apr 15th, 2019, 07:48 AM
#6
Member
Re: Application Installation
Why not have the version number on a table and allow the app to check that it is the current version.
-
Apr 15th, 2019, 07:54 AM
#7
Member
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
-
Apr 15th, 2019, 08:02 AM
#8
Re: Application Installation
Originally Posted by ragavendran
@ 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.
-
Apr 15th, 2019, 08:07 AM
#9
Re: Application Installation
Originally Posted by SamCam15
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.
-
Apr 15th, 2019, 08:19 AM
#10
Member
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.
-
Apr 15th, 2019, 09:53 AM
#11
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|