Open windows explorer from .NET desktop app

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I'd like to open up Windows Explorer from my .NET desktop application to a
specific path. I essentially want to execute:

%Systemroot%\explorer.exe c:\somepath\

How can this be done? Thanks in advance.

Mark
 
Mark:

Imports System.Diagnostics

Class Explorer

Public Shared Sub StartExplorer(ByVal folder As String)
Dim sExplorerEXE As String = String.Format("{0}\explorer.exe",
Environment.GetEnvironmentVariable("windir"))
Dim info As New ProcessStartInfo(sExplorerEXE)
info.Arguments = "/n," + folder
Process.Start(info)
End Sub

End Class


see Command-Line Switches for Windows Explorer:
http://support.microsoft.com/kb/q130510/

Hope this helps,

Shariq Khan
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top