views:

41

answers:

1

I need to determine the path of the original explorer.exe on both 32-bit and 64-bit Windows in a C# project. What is the most reliable way to achieve that?

+4  A: 

I would use the environment variable "windir" as explorer.exe is located in there

string windir = Environment.GetEnvironmentVariable("windir");
string explorerPath = windir + @"\explorer.exe";
Xander
Works marvelous, thank you!
Hedge
@Hedge: you are welcome :-)
Xander