Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.

Quick

  • ($a, $b....) = unpack("A2A7...", $packed)
  • push( array, list )

Monday, April 19, 2010

C# shell command

stdout capture example:

Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.Arguments = @"/c reg query HKEY_CURRENT_USER\Software\Crapware\UniCrap /s";
p.Start();
string output = p.StandardOutput.ReadToEnd();

Followers

Blog Archive