アプリケーションの再起動後に起動引数を使用するにはどうすればよいですか?C#ツールの再起動後に起動引数を使用する
は、私は次のように引数を渡している:
private void updateApplication(string tempFilePath, string currentPath, string newPath, string launchArgs)
{
string argument = "/C Choice /C Y /N /D Y /T 4 & Del /F /Q \"{0}\" & Choice /C Y /N /D Y /T 2 & Move /Y \"{1}\" \"{2}\" & Start \"\" /D \"{3}\" \"{4}\" {5}";
ProcessStartInfo info = new ProcessStartInfo();
info.Arguments = string.Format(argument, currentPath, tempFilePath, newPath, Path.GetDirectoryName(newPath), Path.GetFileName(newPath), launchArgs);
info.WindowStyle = ProcessWindowStyle.Hidden;
info.CreateNoWindow = true;
info.FileName = "cmd.exe";
Process.Start(info);
}
今すぐツールがアップグレードしまうと、再起動が、どのように私は新しい再起動時にlaunchArgsに保存されている渡された引数を使用することができますか?
新しい起動に引数を渡す – Steve