Dim updateInfo As System.Deployment.Application.UpdateCheckInfo = Nothing 'Check if application is network deployed If System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed Then 'Application is network deployed Dim objAppDeploy As System.Deployment.Application.ApplicationDeployment = System.Deployment.Application.ApplicationDeployment.CurrentDeployment 'Check for updates and get update information Try updateInfo = objAppDeploy.CheckForDetailedUpdate() Catch ex As System.Deployment.Application.DeploymentDownloadException Return "Program updates for " & gblstrFormText & " cannot be downloaded at this time." & _ vbCrLf & "Please check your network connection and try again." & _ " If the problem persists, please contact support." & _ vbCrLf & vbCrLf & "Error: " & _ ex.Message Catch ex As InvalidOperationException Return "This program cannot be updated. It is likely not a ClickOnce application." & _ vbCrLf & vbCrLf & "Error: " & ex.Message Catch ex As Exception ' ***** THIS IS THE EXCEPTION THAT GETS HIT ******* Return "This program cannot be updated. " & _ vbCrLf & vbCrLf & "Error: " & '...rest of the code is not relevant
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)