public static string ParseArgs()
{
string args = Environment.CommandLine.TrimEnd();
// If the command line starts with quotes, then look for the first occurence of a quote following it.
int index = args.StartsWith("\"") ? args.IndexOf("\"", 1) : args.IndexOf(" ");
if (index == -1 || index >= args.Length - 1)
{
return String.Empty;
}
return args.Substring(index + 1).Trim();
}