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
2010-09-17 10:39:39
Works marvelous, thank you!
Hedge
2010-09-17 10:47:31
@Hedge: you are welcome :-)
Xander
2010-09-17 14:51:42