tags:

views:

191

answers:

1

I have an application which takes a string value of the form %programfiles%\directory\tool.exe from its application config file.

I want to make this into a useable filename so that I can call

System.Diagnostics.Process.Start(filename)

and have it execute the application. I'm curently getting a System.ComponentModel.Win32Exception - The system cannot find the file specified

Many thanks for any help with this.

+15  A: 
filename = Environment.ExpandEnvironmentVariables(filename);
Marc Gravell
Marc, Many thanks for the speedy response!
Sam Meldrum