Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
hello
how can i get windows explorer path from the current explorer open
http://i.stack.imgur.com/P4GAv.png[^]
Posted

 
Share this answer
 
Comments
Maciej Los 13-Dec-14 9:51am    
5ed!
BillWoodruff 13-Dec-14 12:38pm    
Looking at the linked picture, I conclude the OP wants the path to the Internet Explorer application, not to an a File Explorer Instance.
DamithSL 13-Dec-14 12:45pm    
OP asking for 'how can i get windows explorer path from the current explorer open?' in the image OP opened IE path but that not giving any hint on OP asking for IE path.
BillWoodruff 13-Dec-14 22:00pm    
Hi Damith, I am not saying your answer is not correct; I am just saying that the OP's question could be interpreted another way.

cheers, Bill
To get the filepath to the Internet Explorer Application you need to access a Registry Key:
C#
// required to access Registry
using Microsoft.Win32;

// required to use Process.Start
using System.Diagnostics;

// should work for Win 7/8
private string IEKey = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE";

private void LaunchIE()
{
    string IEPath = Registry.GetValue(IEKey,"Path","").ToString().TrimEnd(';') + @"\iexplore.exe";
    
     Process.Start(IEPath);
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900