How do I get the local machine name?
My computer name is more than 15 chars, so i use hostname.exe to get full length name:
Process proc = new Process();
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.FileName = "c:/windows/system32/hostname.exe";
proc.Start();
var hostName = proc.StandardOutput.ReadLine();