Dos运行,添加注册表
2019-04-01 16:51
ConsoleOutput.ExcuteCmd(" netsh interface set interface name=" & Chr(34) & LinkName & Chr(34) & " admin=Enabled")
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim a As Microsoft.Win32.RegistryKey = My.Computer.Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Run")
a.SetValue("控制本地连接.exe", Application.StartupPath & "\控制本地连接.exe")
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim a As Microsoft.Win32.RegistryKey = My.Computer.Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Run")
a.DeleteValue("控制本地连接.exe")
End Sub