Skip to content

Commit 9988ddb

Browse files
committed
Check for old preferences earlier in WinNUT startup procedure
Prevent auto update check from running before we've had a chance to import the preferences.
1 parent b390c63 commit 9988ddb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

WinNUT_V2/WinNUT-Client/WinNUT.vb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,16 @@ Public Class WinNUT
234234
LogFile.LogTracing("Update Icon at Startup", LogLvl.LOG_DEBUG, Me)
235235
' Start_Tray_Icon = Nothing
236236

237+
If OldParams.WinNUT_Params.RegistryKeyRoot IsNot Nothing Then
238+
LogFile.LogTracing("Previous preferences data detected in the Registry.", LogLvl.LOG_NOTICE, Me,
239+
My.Resources.DetectedPreviousPrefsData)
240+
ManageOldPrefsToolStripMenuItem.Enabled = True
241+
242+
If Not My.Settings.UpgradePrefsCompleted Then
243+
RunRegPrefsUpgrade()
244+
End If
245+
End If
246+
237247
'Run Update
238248
If My.Settings.UP_AutoUpdate And My.Settings.UP_CheckAtStart Then
239249
LogFile.LogTracing("Run Automatic Update", LogLvl.LOG_DEBUG, Me)
@@ -298,16 +308,6 @@ Public Class WinNUT
298308
NotifyIcon.Visible = False
299309
End If
300310

301-
If OldParams.WinNUT_Params.RegistryKeyRoot IsNot Nothing Then
302-
LogFile.LogTracing("Previous preferences data detected in the Registry.", LogLvl.LOG_NOTICE, Me,
303-
My.Resources.DetectedPreviousPrefsData)
304-
ManageOldPrefsToolStripMenuItem.Enabled = True
305-
306-
If Not My.Settings.UpgradePrefsCompleted Then
307-
RunRegPrefsUpgrade()
308-
End If
309-
End If
310-
311311
' Begin auto-connecting if user indicated they wanted it. (Note: Will hang form because we don't do threading yet)
312312
If My.Settings.NUT_AutoReconnect Then
313313
LogFile.LogTracing("Auto-connecting to UPS on startup.", LogLvl.LOG_NOTICE, Me)

0 commit comments

Comments
 (0)