Im not exactly sure what wireguard doing to create virtual network adapters in windows, but it's more looks like it can't handle deletion of them properly.
This issue easy to reproduce:
- Create wireguard's tunnels.
- Connect tunnel, disconnect and remove it.
- Repeat it multiple times.
Windows registry will be full of wrong records of these non-existed network connections.
And now try to open Task Scheduler and click on "Create task..." it will crash with log:
в Microsoft.Windows.ManagementUI.CombinedControls.INetwork.GetName()
в Microsoft.Windows.ManagementUI.CombinedControls.UINetwork.GetUINetwork(INetwork network)
в Microsoft.Windows.ManagementUI.CombinedControls.NetworkListManager.GetNetworkList()
в Microsoft.Windows.ManagementUI.CombinedControls.ControlTaskConditions.PopulateNetworkComboBox()
в Microsoft.Windows.ManagementUI.CombinedControls.ControlTaskConditions.InitializeConditions()
в Microsoft.Windows.ManagementUI.CombinedControls.EditTaskDialog.InitializeView()
в Microsoft.Windows.ManagementUI.CombinedControls.EditTaskDialog.Initialize(UITaskFolder folder, String taskName, String title, UserChoice userAction, BaseResultsControl inOwnerView, String inXmlText)
в Microsoft.Windows.ManagementUI.CombinedControls.BaseResultsControl.CreateTask(UITaskFolder folder, String initialTaskName, String taskXml)
в System.Windows.Forms.MenuItem.OnClick(EventArgs e)
в System.Windows.Forms.MenuItem.MenuItemData.Execute()
в System.Windows.Forms.Command.Invoke()
в System.Windows.Forms.Control.WmCommand(Message& m)
в System.Windows.Forms.Control.WndProc(Message& m)
в System.Windows.Forms.ListView.WndProc(Message& m)
в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
To resolve the problem,
Run regedit
Go to HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList
Delete everything under the following path,
Nla->Cache
Nla->IntranetEnabled
Nla->Wireless
Profiles
Signatures->Managed
Signatures->Unmanaged
Reboot
And it actually helps.
Can wireguard just properly handle this "issue" on his own and do not break Task Scheduler application?