0
如何更改路由器IP地址,選擇該選項並用按鈕保存之後。
想做一個小程序,我可以快速方便地更改路由器的IP地址。wpf - 如何更改IP地址?
namespace WpfApplication1
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void radioButton_Checked(object sender, RoutedEventArgs e)
{
}
private void button_Click(object sender, RoutedEventArgs e)
{
if (checkbox1.IsChecked == true)
{
netsh interface ip set address "Ethernet" static 192.168.1.8 255.255.255.0 192.168.1.1 1
} else if (checkbox2.IsChecked == true)
{
netsh interface ip set address "Ethernet" static 192.168.1.8 255.255.255.0 192.168.1.3 1
} else
{
}
}
}
}
已經回答好幾次了,以她爲例[link](https://stackoverflow.com/questions/1469764/run-command-prompt-commands) –