Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System.Diagnostics.Process.Start help??? 1

Status
Not open for further replies.

EvilDeshi

Programmer
Jan 6, 2006
2
US
I am working with an application that needs to be able to determine the location of the end users program files directory as not everyone uses c drive some use other drive letters. Is there a simple solution so that when i call up System.Diagnostics.Process.Start(@"") it will use their current program files folder? I hope I was specific enough on this thread.
 
The Environment.SpecialFolder enum includes a ProgramFiles member, which will give you the location of Program Files regardless of drive.
 
where can i find more information about the full syntax i would need to use?
 
Code:
System.Diagnostics.Process.Start(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "MyApp.exe"));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top