This is a multi-part message in MIME format.

------=_NextPart_000_0646_01C5C28C.5B447430
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

In my app I have a download folder and I try to open it with this code:
ProcessStartInfo psi =3D new ProcessStartInfo(OutputDir);
psi.UseShellExecute =3D true;
Process.Start(psi);

However it takes about 5 seconds to execute!!
Any idea why?
------=_NextPart_000_0646_01C5C28C.5B447430
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>In my app I have a download folder and =
I try to=20
open it with this code:<BR></FONT><FONT face=3DArial size=3D2><FONT =
color=3D#008080=20
size=3D2>ProcessStartInfo</FONT><FONT size=3D2> psi =3D </FONT><FONT =
color=3D#0000ff=20
size=3D2>new</FONT><FONT size=3D2> </FONT><FONT color=3D#008080=20
size=3D2>ProcessStartInfo</FONT><FONT =
size=3D2>(OutputDir);<BR>psi.UseShellExecute =3D=20
</FONT><FONT color=3D#0000ff size=3D2>true</FONT><FONT =
size=3D2>;<BR></FONT><FONT=20
color=3D#008080 size=3D2>Process</FONT><FONT =
size=3D2>.Start(psi);</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT =
size=3D2>&nbsp;</DIV></FONT></FONT>
<DIV><FONT face=3DArial size=3D2>However it takes about 5 seconds to=20
execute!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial size=3D2>Any =
idea=20
why?</FONT></DIV></BODY></HTML>

------=_NextPart_000_0646_01C5C28C.5B447430--

Re: Process.Start() problem / slowness by CT

CT
Sun Sep 25 20:47:39 CDT 2005

How long does it take you to open Windows Explorer?

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105
Communities - http://community.integratedsolutions.dk

"Lloyd Dupont" <net.galador@ld> wrote in message
news:uhCpOijwFHA.612@TK2MSFTNGP10.phx.gbl...
In my app I have a download folder and I try to open it with this code:
ProcessStartInfo psi = new ProcessStartInfo(OutputDir);
psi.UseShellExecute = true;
Process.Start(psi);

However it takes about 5 seconds to execute!!
Any idea why?



Re: Process.Start() problem / slowness by CT

CT
Sun Sep 25 20:51:49 CDT 2005

Do you need to open Windows Explorer, or will the Command prompt do? If so,

ProcessStartInfo psi = new ProcessStartInfo("cmd.exe");
psi.WorkingDirectory = "c:\\";
psi.UseShellExecute = false;
Process.Start(psi);


--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105
Communities - http://community.integratedsolutions.dk

"CT" <carstent@spammersgoawaydotnetservices.biz> wrote in message
news:O8kUIxjwFHA.2808@TK2MSFTNGP10.phx.gbl...
> How long does it take you to open Windows Explorer?
>
> --
> Carsten Thomsen
> Enterprise Development with VS .NET, UML, AND MSF
> http://www.apress.com/book/bookDisplay.html?bID=105
> Communities - http://community.integratedsolutions.dk
>
> "Lloyd Dupont" <net.galador@ld> wrote in message
> news:uhCpOijwFHA.612@TK2MSFTNGP10.phx.gbl...
> In my app I have a download folder and I try to open it with this code:
> ProcessStartInfo psi = new ProcessStartInfo(OutputDir);
> psi.UseShellExecute = true;
> Process.Start(psi);
>
> However it takes about 5 seconds to execute!!
> Any idea why?
>



Re: Process.Start() problem / slowness by Lloyd

Lloyd
Sun Sep 25 23:06:10 CDT 2005

I do need to open in the explorer, so the user could double-click on the
files (to 'execute them') if he wants.
And the folder seems to display allright when I navigate to it with the File
Explorer....
(I mean no weird latency)

For the record the folder is:
C:\Documents and Settings\Lloyd Dupont\Local Settings\Application
Data\NovaMind Software\NovaMindViewer\1.0.0.0
AKA
Application.LocalUserAppDataPath

"CT" <carstent@spammersgoawaydotnetservices.biz> wrote in message
news:OANadzjwFHA.2960@tk2msftngp13.phx.gbl...
> Do you need to open Windows Explorer, or will the Command prompt do? If
> so,
>
> ProcessStartInfo psi = new ProcessStartInfo("cmd.exe");
> psi.WorkingDirectory = "c:\\";
> psi.UseShellExecute = false;
> Process.Start(psi);
>
>
> --
> Carsten Thomsen
> Enterprise Development with VS .NET, UML, AND MSF
> http://www.apress.com/book/bookDisplay.html?bID=105
> Communities - http://community.integratedsolutions.dk
>
> "CT" <carstent@spammersgoawaydotnetservices.biz> wrote in message
> news:O8kUIxjwFHA.2808@TK2MSFTNGP10.phx.gbl...
>> How long does it take you to open Windows Explorer?
>>
>> --
>> Carsten Thomsen
>> Enterprise Development with VS .NET, UML, AND MSF
>> http://www.apress.com/book/bookDisplay.html?bID=105
>> Communities - http://community.integratedsolutions.dk
>>
>> "Lloyd Dupont" <net.galador@ld> wrote in message
>> news:uhCpOijwFHA.612@TK2MSFTNGP10.phx.gbl...
>> In my app I have a download folder and I try to open it with this code:
>> ProcessStartInfo psi = new ProcessStartInfo(OutputDir);
>> psi.UseShellExecute = true;
>> Process.Start(psi);
>>
>> However it takes about 5 seconds to execute!!
>> Any idea why?
>>
>
>



Re: Process.Start() problem / slowness by Nick

Nick
Mon Sep 26 00:47:12 CDT 2005

I think that has more to do with your hard drive than .NET.
It might be simply slow or fragmented. Also, I am guessing a program in
debug mode might take a little longer to execute such a request, I might
be wrong.

Lloyd Dupont wrote:

> In my app I have a download folder and I try to open it with this code:
> ProcessStartInfo psi = new ProcessStartInfo(OutputDir);
> psi.UseShellExecute = true;
> Process.Start(psi);
>
> However it takes about 5 seconds to execute!!
> Any idea why?

Re: Process.Start() problem / slowness by CT

CT
Mon Sep 26 01:13:30 CDT 2005

Hmm, not quite sure what to think. On my setup the code executes as fast as
opening Windows Explorer manually. What happens if you have only this code
in a sample project/solution, will it execute any faster? What I am getting
at, is if you have any other code that would slow this down.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105
Communities - http://community.integratedsolutions.dk

"Lloyd Dupont" <net.galador@ld> wrote in message
news:eKfhq%23kwFHA.2540@TK2MSFTNGP09.phx.gbl...
>I do need to open in the explorer, so the user could double-click on the
>files (to 'execute them') if he wants.
> And the folder seems to display allright when I navigate to it with the
> File Explorer....
> (I mean no weird latency)
>
> For the record the folder is:
> C:\Documents and Settings\Lloyd Dupont\Local Settings\Application
> Data\NovaMind Software\NovaMindViewer\1.0.0.0
> AKA
> Application.LocalUserAppDataPath
>
> "CT" <carstent@spammersgoawaydotnetservices.biz> wrote in message
> news:OANadzjwFHA.2960@tk2msftngp13.phx.gbl...
>> Do you need to open Windows Explorer, or will the Command prompt do? If
>> so,
>>
>> ProcessStartInfo psi = new ProcessStartInfo("cmd.exe");
>> psi.WorkingDirectory = "c:\\";
>> psi.UseShellExecute = false;
>> Process.Start(psi);
>>
>>
>> --
>> Carsten Thomsen
>> Enterprise Development with VS .NET, UML, AND MSF
>> http://www.apress.com/book/bookDisplay.html?bID=105
>> Communities - http://community.integratedsolutions.dk
>>
>> "CT" <carstent@spammersgoawaydotnetservices.biz> wrote in message
>> news:O8kUIxjwFHA.2808@TK2MSFTNGP10.phx.gbl...
>>> How long does it take you to open Windows Explorer?
>>>
>>> --
>>> Carsten Thomsen
>>> Enterprise Development with VS .NET, UML, AND MSF
>>> http://www.apress.com/book/bookDisplay.html?bID=105
>>> Communities - http://community.integratedsolutions.dk
>>>
>>> "Lloyd Dupont" <net.galador@ld> wrote in message
>>> news:uhCpOijwFHA.612@TK2MSFTNGP10.phx.gbl...
>>> In my app I have a download folder and I try to open it with this code:
>>> ProcessStartInfo psi = new ProcessStartInfo(OutputDir);
>>> psi.UseShellExecute = true;
>>> Process.Start(psi);
>>>
>>> However it takes about 5 seconds to execute!!
>>> Any idea why?
>>>
>>
>>
>
>



Re: Process.Start() problem / slowness by Lloyd

Lloyd
Mon Sep 26 19:42:12 CDT 2005

This is a multi-part message in MIME format.

------=_NextPart_000_07A7_01C5C350.1E99E7D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I speed it up!
I didn't use Shell execute but uses this code instead:
ProcessStartInfo psi =3D new ProcessStartInfo();
psi.FileName =3D "explorer.exe";
psi.Arguments =3D string.Format("\"{0}\"", OutputDir);
psi.UseShellExecute =3D false;
Process.Start(psi);

"Lloyd Dupont" <net.galador@ld> wrote in message =
news:uhCpOijwFHA.612@TK2MSFTNGP10.phx.gbl...
In my app I have a download folder and I try to open it with this =
code:
ProcessStartInfo psi =3D new ProcessStartInfo(OutputDir);
psi.UseShellExecute =3D true;
Process.Start(psi);

However it takes about 5 seconds to execute!!
Any idea why?
------=_NextPart_000_07A7_01C5C350.1E99E7D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I speed it up!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I didn't use Shell execute but uses =
this code=20
instead:<BR></FONT><FONT color=3D#008080 =
size=3D2>ProcessStartInfo</FONT><FONT=20
size=3D2> psi =3D </FONT><FONT color=3D#0000ff size=3D2>new</FONT><FONT =
size=3D2>=20
</FONT><FONT color=3D#008080 size=3D2>ProcessStartInfo</FONT><FONT=20
size=3D2>();<BR>psi.FileName =3D </FONT><FONT color=3D#800000=20
size=3D2>"explorer.exe"</FONT><FONT size=3D2>;<BR>psi.Arguments =3D =
</FONT><FONT=20
color=3D#0000ff size=3D2>string</FONT><FONT =
size=3D2>.Format(</FONT><FONT=20
color=3D#800000 size=3D2>"\"{0}\""</FONT><FONT size=3D2>,=20
OutputDir);<BR>psi.UseShellExecute =3D </FONT><FONT color=3D#0000ff=20
size=3D2>false</FONT><FONT size=3D2>;<BR></FONT><FONT color=3D#008080=20
size=3D2>Process</FONT><FONT size=3D2>.Start(psi);</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Lloyd Dupont" &lt;<A =
href=3D"mailto:net.galador@ld">net.galador@ld</A>&gt;=20
wrote in message <A=20
=
href=3D"news:uhCpOijwFHA.612@TK2MSFTNGP10.phx.gbl">news:uhCpOijwFHA.612@T=
K2MSFTNGP10.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>In my app I have a download folder =
and I try to=20
open it with this code:<BR></FONT><FONT face=3DArial size=3D2><FONT =
color=3D#008080=20
size=3D2>ProcessStartInfo</FONT><FONT size=3D2> psi =3D </FONT><FONT =
color=3D#0000ff=20
size=3D2>new</FONT><FONT size=3D2> </FONT><FONT color=3D#008080=20
size=3D2>ProcessStartInfo</FONT><FONT =
size=3D2>(OutputDir);<BR>psi.UseShellExecute=20
=3D </FONT><FONT color=3D#0000ff size=3D2>true</FONT><FONT =
size=3D2>;<BR></FONT><FONT=20
color=3D#008080 size=3D2>Process</FONT><FONT=20
size=3D2>.Start(psi);</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT =
size=3D2>&nbsp;</DIV></FONT></FONT>
<DIV><FONT face=3DArial size=3D2>However it takes about 5 seconds to=20
execute!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2>Any idea=20
why?</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_07A7_01C5C350.1E99E7D0--