If My.Application.IsNetworkDeployed AndAlso My.Application.Deployment.CheckForUpdate Then
NotifyIcon1.ShowBalloonTip(10, "Update", "Updating Application...", ToolTipIcon.Info)
My.Settings.Save()
Application.DoEvents()
My.Application.Deployment.Update()
System.Windows.Forms.Application.Restart()
End If