Skip to content

Instantly share code, notes, and snippets.

View Harry260's full-sized avatar
🤌
Nevgon gib u up!

Harry Harry260

🤌
Nevgon gib u up!
View GitHub Profile
@Harry260
Harry260 / hiddencmd.cs
Created July 10, 2021 07:28
Run cmd command inside c# application/winforms without opening cmd window
runCommand("ipconfig") //Usage example
private void runCommand(String Arg)
{
Process process = new Process();
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.CreateNoWindow = true;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
x=msgbox("We're no strangers to love",1+64,"Rick Astley")
x=msgbox("You know the rules and so do I",1+64,"Rick Astley")
x=msgbox("A full commitment's what I'm thinking of",1+64,"Rick Astley")
x=msgbox("You wouldn't get this from any other guy",1+64,"Rick Astley")
x=msgbox("I just wanna tell you how I'm feeling",1+64,"Rick Astley")
x=msgbox("Gotta make you understand",1+64,"Rick Astley")
x=msgbox("Never gonna give you up",1+64,"Rick Astley")
x=msgbox("Never gonna let you down",1+64,"Rick Astley")
x=msgbox("Never gonna run around and desert you",1+64,"Rick Astley")
x=msgbox("Never gonna make you cry",1+64,"Rick Astley")