I am looking on Internet , I couldn't find, small windows code snippet to enable Wireless LAN and disable Wireless LAN or small dialog to enable / disable wireless LAN.thanks.
small windows code snippet to enable Wireless LAN and disable Wireless LAN
Collapse
X
-
-
Thanks a lot. wrote simple app - I need to run this app as "Run as administrator" mode, when I am regular user and no admin password with me, I canot run this.
Code:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { System.Diagnostics.Process process = new System.Diagnostics.Process(); MessageBox.Show("WLAN Enable"); process.StartInfo.FileName = "net.exe"; process.StartInfo.Arguments = "start Wlansvc"; process.Start(); } private void button2_Click_1(object sender, EventArgs e) { System.Diagnostics.Process process = new System.Diagnostics.Process(); MessageBox.Show("WLAN Disable"); process.StartInfo.FileName = "net.exe"; process.StartInfo.Arguments = "stop Wlansvc"; process.Start(); } } }Comment
Comment