Skip to content

Instantly share code, notes, and snippets.

@imba-tjd
Last active December 3, 2022 06:11
Show Gist options
  • Save imba-tjd/c782bef3524c03ed3a00dc775776d54c to your computer and use it in GitHub Desktop.
Save imba-tjd/c782bef3524c03ed3a00dc775776d54c to your computer and use it in GitHub Desktop.
我也忘记这代码是做什么的了
using System.Diagnostics;
class CMDW {
static void Main(string[] args) {
Process.Start(new ProcessStartInfo("cmd") {
Arguments = string.Join(" ", args),
UseShellExecute = false,
CreateNoWindow = true
}).WaitForExit();
}
}
// Compile: C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe -t:winexe cmdw.cs
// Run: cmdw /c <cmd command>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment