Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我编写了这段代码来在控制台的 %appdata% 中打开一个 .exe 文件:
try { System.Diagnostics.Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData )); } catch { }
它打开 appdata 目录,但我希望它打开一个.exe文件。我应该怎么办?
.exe
调用程序前需要将exe名称与文件夹名称结合起来
System.Diagnostics.Process.Start( System.IO.Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData ), "Exename.exe")