C# Windows Service - Start .exe from App.config

Viewed 454

I use the below code to execute a .exe file from Windows Service.

System.Diagnostics.Process.Start(path);

Right now, I hard coded the path as @'C:\Program Files\Server\Test.exe' It is working fine.

Now, I want to avoid the hard coding. When I just use Test.exe, it goes to C:\Windows\System32.

How can I dynamically get the installed path from windows service? Or how can I read path from App.config file ?

3 Answers
Related