응용 프로그램을 다시 시작한 후에 어떻게 시작 인수를 사용할 수 있습니까?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