Try adding Directory.Exists( proc.StartInfo.WorkingDirectory ) after installing it. Does Test.exe in this directory?
Also try:
string filename = Path.Combine( Directory.GetCurrentDirectory(), "Stress", "test.exe" ); check File.Exists( filename );
it is possible to use filename as proc.StartInfo.FileName
For your working directory, use: Path.Combine( Directory.GetCurrentDirectory(), "Stress" )
To clarify, I would say to use:
proc.StartInfo.WorkingDirectory = Path.Combine( Directory.GetCurrentDirectory(), "Stress"); proc.StartInfo.FileName = Path.Combine( Directory.GetCurrentDirectory(), "Stress", "Test.exe" ); bool folderExists = Directory.Exists( proc.StartInfo.WorkingDirectory ); bool fileExists = File.Exists( proc.StartInfo.FileName );
You can debug information about whether a file and folder exist.
Derek source share