473,386 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Open windows explorer from .NET desktop app

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
Nov 21 '05 #1
3 9248
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
sh****@shariqkhan.com


"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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

Nov 21 '05 #2
System.Diagnostics.Process.Start("explorer.exe", "C:\somepath")

Nov 21 '05 #3
Nak
System.Diagnostics.Process.Start("c:\somepath")
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Anonymous | last post by:
I have a simple ASP.net form with a button on it that when the user clicks on the button I want a folder to open in windows explorer. I have tried the following without success. No error...
3
by: Colin Williams | last post by:
Hi I am trying to open windows explorer at a specific path on a server. Path is not found whe run. It works ok using a local path. How do i address a server? Code as follows; {...
3
by: androoo | last post by:
Hi I need my users to have a shortcut to windows\tasks from my vb.net app. But im not sure the simplest solution to lauch explorer and navigate to the directory... Anyone help ??? Many...
0
by: jensro | last post by:
Is it possible to get a notification during a drag and drop operation to the Windows Explorer / Desktop as soon as the user drops an item there? I need this in order to perform an export operation...
2
by: jercha | last post by:
I have a form that allows users to open Windows Explorer and view folders based on a list of path names. I want to create code that will close all or a specific Windows Explorer screen. I...
1
by: Franck | last post by:
I'm basicly a Vb6 dev but i actually have to play around with c# alot more. I have studied C# at school at beginner/intermediate level so i understand the bases. I'm working on a project that i...
3
by: Tim Kelley | last post by:
Is there a way (command line switch) to open Windows Explorer and set the view to Thumbnails? Thanks, Tim
4
by: =?Utf-8?B?RG91Zw==?= | last post by:
Could someone tell me how to make windows explorer in xp pro open to the folder of my choice? I am tired of having to start from the desktop , computer, c:\ I would like it to open to the c:\"and...
4
by: terrybell105 | last post by:
Is there a way I can open Windows Explorer at a specific folder, size the window, and position it in relation to the (already opened) Access window? I have a client who wants this capability. It...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.