I am trying to call a script that is located in program files but it wont work...I believe the problem is in the fact that it doesn't recognize the directory "Program Files" but I don't know how to solve this very basic mistake.
ProcessStartInfo(@"C:\Program Files\Scripts\bin\scriptmgr", "--dts" + filename);
Do you have a missing space?
ProcessStartInfo(@"C:\Program Files\Scripts\bin\scriptmgr", "--dts " + filename); ^
You could try using an environment variable such as
ProcessStartInfo pInfo = new ProcessStartInfo(@"%programfiles%\Scripts\bin\scriptmgr\" + fileName); pInfo.Arguments = "--dts"; Process.Start(pInfo);
ProcessStartInfo to specify the arguments/other variables