I am starting a process to disconnect a network drive, but it always pops up a command prompt window. It just flashes by quickly and disappears, but i would like to configure it so the window doesn't open at all. Any ideas?
Here is the c# code I'm currently using:
private void btnDisconnectNetwork_Click(object sender, EventArgs e)
{
Process DisconnectDrive = new Process();
DisconnectDrive.StartInfo.FileName = "Net.exe";
DisconnectDrive.StartInfo.Arguments = @" Use /d Q:";
DisconnectDrive.StartInfo.CreateNoWindow = true;
DisconnectDrive.Start();
}