单击按钮时,我想执行命令以通过位锁定器锁定驱动器。这个怎么做?我是 C# 的新手
命令是:
manage-bde -lock x:
它将如何发送到控制台?这是代码
private void btnlock_Click(object sender, EventArgs e)
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/C manage-bde -lock "+textBox1.Text+":";
process.StartInfo = startInfo;
process.Start();
}