473,801 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open windows explorer at server path

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.Diagnost ics.ProcessStar tInfo exploreTest
= new System.Diagnost ics.ProcessStar tInfo();
exploreTest.Fil eName = "explorer.e xe";
exploreTest.Arg uments ="\"\\servernam e\\path\\";
System.Diagnost ics.Process.Sta rt(exploreTest) ;
}
Thanks
Colin Williams

Sep 14 '06 #1
3 11704
Colin,

It's the Arguments property. It should look like this:

exploreTest.Arg uments = "\\\\servername \\path\\";

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Colin Williams" <co************ **@msn.comwrote in message
news:11******** *************@i 3g2000cwc.googl egroups.com...
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.Diagnost ics.ProcessStar tInfo exploreTest
= new System.Diagnost ics.ProcessStar tInfo();
exploreTest.Fil eName = "explorer.e xe";
exploreTest.Arg uments ="\"\\servernam e\\path\\";
System.Diagnost ics.Process.Sta rt(exploreTest) ;
}
Thanks
Colin Williams

Sep 14 '06 #2
Thanks Nicholas
Works great. Im having trouble getting my head round the backslash
usage for paths in C#. I must have tried everthing else but your
solution.
Kind regards
Colin


Nicholas Paldino [.NET/C# MVP] wrote:
Colin,

It's the Arguments property. It should look like this:

exploreTest.Arg uments = "\\\\servername \\path\\";

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Colin Williams" <co************ **@msn.comwrote in message
news:11******** *************@i 3g2000cwc.googl egroups.com...
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.Diagnost ics.ProcessStar tInfo exploreTest
= new System.Diagnost ics.ProcessStar tInfo();
exploreTest.Fil eName = "explorer.e xe";
exploreTest.Arg uments ="\"\\servernam e\\path\\";
System.Diagnost ics.Process.Sta rt(exploreTest) ;
}
Thanks
Colin Williams
Sep 14 '06 #3

For paths you could use @"" instead of just quotes which will allow
you to use individual slashes:

exploreTest.Arg uments = @"\\servername\ path\";

Also for most places in windows you can use a forward-slash instead

new StreamReader("c :/temp/test.txt");

Process is one of the exceptions--won't work in the original situation
you specified, but will work most places.

HTH,

Sam
------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On 14 Sep 2006 14:04:17 -0700, "Colin Williams"
<co************ **@msn.comwrote :
>Thanks Nicholas
Works great. Im having trouble getting my head round the backslash
usage for paths in C#. I must have tried everthing else but your
solution.
Kind regards
Colin


Nicholas Paldino [.NET/C# MVP] wrote:
>Colin,

It's the Arguments property. It should look like this:

exploreTest.Ar guments = "\\\\servername \\path\\";

Hope this helps.
Sep 14 '06 #4

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

Similar topics

2
7104
by: Éric GARANT | last post by:
Hello everyone, I can't open ASP documents with Windows 2000 Pro french version SP4 + IE6.0 SP1 + IIS 5.0. When I click an ASP file, it's FrontPage 2000 that opens it. If I choose Open With... Internet Explorer, nothing opens. And if I can have an ASP page open in IE, if there is a link to another ASP page, when I click it, it doesn't open that ASP link, instead IE asks if I want to download the file. IE seems to be unable to process ASP...
4
2594
by: Chuck Anderson | last post by:
I use apache, Php and MySql on my Windows XP machine at home. I have been doing so successfully now for a long time. However, I am now trying to use fopen to open secure URLs (https) and having no luck. I have installed openssl and enabled the extension (phpinfo says so, too). But still it does not work. I now realize that I need to have https and ftps as registered streams, i.e., Registered PHP Streams php, http, ftp, https,...
1
1462
by: Brian | last post by:
I have a complex problem that needs a lot of background explanation before I can ask questions, so here goes.... Our system consists of two servers. -WebUI server - Windows 2000 - runs asp.net pages, and handles http requests. All requests go through this frontend public server. Business objects are then called, which execute stored procs, etc on the WebSQL server. -WebSQL server - Windows 2000 - SQLServer2000 database and file...
3
4818
by: Aaron | last post by:
My application will only be used on windows based machines. I need to open a folder using UNC naming. i.e. \\server\share\folder I do not need to do anything programatically with the folder like count the files, or determine permissions, I just need explorer to launch the specified path. Ideally it would work something like: Dim FolderPath as string
6
6769
by: Daniel | last post by:
Hi all, Can i open and edit the excel sheet on web page after downloading? After editing, i close the web page and the excel file auto upload to the server. Is it possible? I really struggling about the ability. If not, what advice can u provide? thank you in advance. ur help will be appreaciated.
13
39910
by: Chris Johnson | last post by:
I have what seems to be such a simple thing yet I cannot figure out how to do it. I am using a streamwriter to build a text file. At the end of the process I want to open that same text file in notepad so the user can see what was built. I cannot for the life of me figure out how to get the text file to open up in notepad on the screen. All the processes I have tried opens the file into the filestream again.
6
3691
by: mardif | last post by:
Hi guys. I've a very big big big problem: I've in my windows computer a file named cicciobello.html, located in c:\documents and settings\username\desktop\cicciobello.html. Now, I MUST open this file with os.spawn(os.P_WAIT ...., because I must wait the user cancel the explorer window, ok? And so, I write:
1
2365
by: Dachshund Digital | last post by:
If Explorer can display a file path longer than 260 odd characters, why is it that System.IO.File.Open Method can not? Calling GetFiles from my.computer.fileystem can return paths longer but File.Open can not open them? For example the following path causes File.Open to freak. Could not find a part of the path 'E:\_Old Development\Volume I \_Visual Studio Projects (Old)\_Very Old Development\_Development Example(s)\How to improve...
24
5085
by: dancer | last post by:
Using ASP.net 1.1 and Microsoft Access. I received the following error message. Why? I have closed the Access file. I have another very small access file that opens with no trouble with the same code, except a different name for the file. The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\Accident.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
0
9697
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
9555
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
10515
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10291
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
5479
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
5616
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4156
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3771
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2956
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.