How do I integrate the Advanced Updater with my VB.NET application?
Sample code on how to integrate the updater with a VB.NET application.
Imports System Imports System.Threading Imports System.IO Imports System.Diagnostics REM Sample code for using the Advanced Updater from VB.NET applications. REM REM Note: For this sample code to work you must have the updater.exe and updater.ini REM beside the VB.NET application's main exe. REM REM @author Advanced Installer team Public Class Form1 Private updaterModulePath As String Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Dim thread As Thread = New Thread(New ThreadStart(AddressOf StartSilent)) thread.Start() REM Compute the updater.exe path relative to the application main module path updaterModulePath = Path.Combine(Application.StartupPath, "updater.exe") End Sub Private Sub StartSilent() Thread.Sleep(10000) Dim proc As Process = Process.Start(updaterModulePath, "/silent") proc.Close() End Sub REM This handler should be associated with a menu item that launches the REM updater's configuration dialog. Private Sub UpdaterOptionsMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles UpdaterOptionsMenuItem.Click Dim proc As Process = Process.Start(updaterModulePath, "/configure") proc.Close() End Sub REM This handler should be associated with a menu item that launches the REM updater in check now mode (usually from Help submenu) Private Sub CheckForUpdatesMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles CheckForUpdatesMenuItem.Click Dim proc As Process = Process.Start(updaterModulePath, "/checknow") proc.Close() End Sub Private Sub CloseMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles CloseMenuItem.Click Application.Exit() End Sub End Class