I have a program that is stored in program files folder.
I created windows service to run it, but when I do, it doesn’t start.
I used process monitor to see what happens, and realized that it’s looking for all dependencies in system32 folder.
If I take the program, with all referenced dependencies and paste them into the root of system32 folder, it works! But I don’t like it that way, I want to run it from specific folder.
The PATH trick didn’t work. It gave me error about some depended file software were trying to locate. But I found the solution. You can provide working directory:
process.StartInfo.WorkingDirectory
That did the trick. Thanks anyway!