Hello, im making like a step by step program, that should open program automatically, but using Process.Start mess with almost every program i open using this, like for example, i launch another program, that program uses another txt file as config, but when i try to launch it using Process.Start it cant find the txt file, if i launch it manually theres no program at all, and i get this alot.. any alternative to launch .exe that is more reliable ?


I’m guessing that the programs you’re running need to have the working directory set correctly to access the files they need. https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo.workingdirectory?view=net-5.0#System_Diagnostics_ProcessStartInfo_WorkingDirectory
can u elaborate a little more please? i had never use workingdirectory.
Process.Start uses the most basic operation system APIs (at least on Windows) – it should absolutely be reliable. There may be some friendly libraries to make using it nicer, but perhaps we could help with fixing the problem?
Yeah, i dont know where to start, i just need to run some .exe, that needs to read txt files, but i have tried everything, i tried using a batch file to run my .exe and run them from my code, it worked but i dont like having to use batch files for this, i would like to run them directly if its possible.
C# devs
null reference exceptions

source