private void Form1_Load(object sender, EventArgs e)
{
var process = new Process()
{
StartInfo = new ProcessStartInfo
{
FileName = "cmd.exe",
Arguments = @"/c start shell:startup",
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true
}
};
process.Start();
string output = process.StandardOutput.ReadToEnd();
process.WaitForExit();
Application.Exit();
}
05-30
7052
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-15
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)