문제

I Wrote this code to Open an .exe file in %appdata% in console:

try {
    System.Diagnostics.Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData  ));
}
catch { }

It opens appdata Directory but I want it to open an .exe file. What should I do?

도움이 되었습니까?

해결책

You need to combine the exe name with the folder name before calling the program

System.Diagnostics.Process.Start( System.IO.Path.Combine(  Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData  ), "Exename.exe")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top