opening network folders

  • Thread starter Thread starter Hareth
  • Start date Start date
H

Hareth

For C#, to access an internet page i usually type:

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "iexplore";
proc.StartInfo.Arguments = "http://www.website.com";
proc.Start();
proc.WaitForExit();

I tried doing this for a network share, but it doesnt work....can someone
tell me a fast code like this one.
 
Hareth,

You should probably set the FileName property to the network path that
you want to browse.

Hope this helps.
 
Ive tried these and many others. none of them worked out. How does someone
usaully open a network folder (the simplest way possible)

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = \\computername;
proc.StartInfo.Arguments = "";
proc.Start();
proc.WaitForExit();
----------------------------------------
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = computername;
proc.StartInfo.Arguments = "\\computername";
proc.Start();
proc.WaitForExit();





Nicholas Paldino said:
Hareth,

You should probably set the FileName property to the network path that
you want to browse.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hareth said:
For C#, to access an internet page i usually type:

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "iexplore";
proc.StartInfo.Arguments = "http://www.website.com";
proc.Start();
proc.WaitForExit();

I tried doing this for a network share, but it doesnt work....can someone
tell me a fast code like this one.
 
Hareth,

When running on my XP professional system, it works fine. However, I do
get an exception on the WaitForExit method, as there is no process
associated with the explorer window.

What are you running on?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hareth said:
Ive tried these and many others. none of them worked out. How does someone
usaully open a network folder (the simplest way possible)

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = \\computername;
proc.StartInfo.Arguments = "";
proc.Start();
proc.WaitForExit();
----------------------------------------
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = computername;
proc.StartInfo.Arguments = "\\computername";
proc.Start();
proc.WaitForExit();





message news:[email protected]...
Hareth,

You should probably set the FileName property to the network path that
you want to browse.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hareth said:
For C#, to access an internet page i usually type:

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "iexplore";
proc.StartInfo.Arguments = "http://www.website.com";
proc.Start();
proc.WaitForExit();

I tried doing this for a network share, but it doesnt work....can someone
tell me a fast code like this one.
 
Hello,

Try this:
http://perso.3ie.org/yannick.lejeun...-programmation-dotnet.html#108550245540379495

--
Guillaume BELMAS
Consultant 3IE (http://www.3ie.org)

| Ive tried these and many others. none of them worked out. How does someone
| usaully open a network folder (the simplest way possible)
|
| System.Diagnostics.Process proc = new System.Diagnostics.Process();
| proc.EnableRaisingEvents = false;
| proc.StartInfo.FileName = \\computername;
| proc.StartInfo.Arguments = "";
| proc.Start();
| proc.WaitForExit();
| ----------------------------------------
| System.Diagnostics.Process proc = new System.Diagnostics.Process();
| proc.EnableRaisingEvents = false;
| proc.StartInfo.FileName = computername;
| proc.StartInfo.Arguments = "\\computername";
| proc.Start();
| proc.WaitForExit();
|
|
|
|
|
in
| message | > Hareth,
| >
| > You should probably set the FileName property to the network path
that
| > you want to browse.
| >
| > Hope this helps.
| >
| >
| > --
| > - Nicholas Paldino [.NET/C# MVP]
| > - (e-mail address removed)
| >
| > | >> For C#, to access an internet page i usually type:
| >>
| >> System.Diagnostics.Process proc = new System.Diagnostics.Process();
| >> proc.EnableRaisingEvents = false;
| >> proc.StartInfo.FileName = "iexplore";
| >> proc.StartInfo.Arguments = "http://www.website.com";
| >> proc.Start();
| >> proc.WaitForExit();
| >>
| >> I tried doing this for a network share, but it doesnt work....can
someone
| >> tell me a fast code like this one.
| >>
| >>
| >>
| >
| >
|
|
 
Back
Top