473,789 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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%\ex plorer.exe c:\somepath\

How can this be done? Thanks in advance.

Mark
Nov 21 '05 #1
3 9274
Mark:

Imports System.Diagnost ics

Class Explorer

Public Shared Sub StartExplorer(B yVal folder As String)
Dim sExplorerEXE As String = String.Format(" {0}\explorer.ex e",
Environment.Get EnvironmentVari able("windir"))
Dim info As New ProcessStartInf o(sExplorerEXE)
info.Arguments = "/n," + folder
Process.Start(i nfo)
End Sub

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

Hope this helps,

Shariq Khan
sh****@shariqkh an.com


"Mark" <fi******@idono tlikejunkmail.u mn.edu> wrote in message
news:%2******** ********@TK2MSF TNGP14.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%\ex plorer.exe c:\somepath\

How can this be done? Thanks in advance.

Mark

Nov 21 '05 #2
System.Diagnost ics.Process.Sta rt("explorer.ex e", "C:\somepat h")

Nov 21 '05 #3
Nak
System.Diagnost ics.Process.Sta rt("c:\somepath ")
Nov 21 '05 #4

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

Similar topics

1
5138
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 messages . . . it just doesn't work. System.Diagnostics.Process.Start("Explorer.exe", "\\ServerName\Subfolder1\Test\AccountingReports") Thanks!!!!
3
11702
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; { System.Diagnostics.ProcessStartInfo exploreTest = new System.Diagnostics.ProcessStartInfo(); exploreTest.FileName = "explorer.exe";
3
16324
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 thanks
0
1293
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 upon such a notification (my intention is to provide the user an easy way of exporting data by dragging items from a ListView of my application into Windows Explorer or onto the Desktop). I saw similar behaviour in non .NET applications (e.g....
2
8899
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 used this line to open the Windows Explorer Application.FollowHyperlink strPathName, , False, False How do I close Windows Explorer?
1
1699
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 need to open windows explorer on a folder X. That i managed to do it with : System.Diagnostics.Process.Start(@"C:\blablabla\"); that work #1 but now another option need to be able to open a folder like that but run a search starting at that root...
3
2123
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
1213
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 what ever folder I want" I had someone tell me how to do this in Vista, but when I try to apply these same settings to xp it almost work. One problem is you lose the left pane. Thanks, Doug
4
8957
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 would be great if I can do it inside an Access control, but I guess that's asking a bit much?
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9499
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8998
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5540
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2898
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.