Option Strict On Imports System.Net Public Module Globals Sub New() Settings.OpenRegistry() End Sub Public Enum WizardTask ' Wizard modes USER_SELECTED_DISTRIBUTION USER_SELECTED_DISTRIBUTION_DATA2 DHCP_CONFIG End Enum Public strAppdir, strTFTPdir As String 'Path sets directory strAppdir=AnywhereTS root directory strTFTPdir=TFTP root directory Public Const strVersion As String = "2.20" ' The version string for AnywhereTS Public WizardMode As WizardTask ' Startup mode for wizard, as defined in WizardTask Public isPro As Boolean ' The program version. True = we are running the pro version. Public bolCheckForUpdates As Boolean ' True = Automatic update checking enabled Public bolDhcpNotInst As Boolean ' True = Run for the firs time Public intNoOfValidAdapters As Integer Public strComputerIPAddress As String 'This computer's IP address. If serveral, the one the user has selected. Public Sub WriteCheckUpdatesRegkey() Dim objRegkey As Microsoft.Win32.RegistryKey On Error GoTo NoRegWrite objRegkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\AnywhereTS\ts-config", True) If (objRegkey Is Nothing) Then objRegkey = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("SOFTWARE\AnywhereTS\ts-config") End If If (objRegkey Is Nothing) Then GoTo NoRegWrite End If If Globals.bolCheckForUpdates Then objRegkey.SetValue("CheckUpdate", 1) Else objRegkey.SetValue("CheckUpdate", 0) End If Return NoRegWrite: On Error GoTo -1 MessageBox.Show("Failed to write to registry. Aborting.", "AnywhereTS", MessageBoxButtons.OK, MessageBoxIcon.Asterisk) Application.Exit() End Sub End Module