У меня есть проект, в котором у меня есть несколько экземпляров приложения, каждый из которых был запущен с различными аргументами командной строки. Я хотел бы иметь возможность щелкнуть кнопку из одного из этих экземпляров, который затем выключит все экземпляры и снова запустит их обратно с теми же аргументами командной строки.
Я могу легко получить процессы через Process.GetProcessesByName()
, но всякий раз, когда я это делаю, свойство StartInfo.Arguments
всегда является пустой строкой. Похоже, что это свойство действительно только до начала процесса.