By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,301 Members | 3,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,301 IT Pros & Developers. It's quick & easy.

process.start() program hangs

P: n/a
hello,

if i start a program (an exe-file) with Process.Start(...) I don't have the
required permissions that the programm needs (i could start the programm but
the program needs special rights). So I added the StartInfo.UserName and
Password to the Process. Now the program starts, but it hangs... nothing
happens. In the task-manager the process is created, but it doesn't do
anything - no cpu-load and no change of memory-usage.

What could be the problem? Why hangs the programm? I've tried also an other
programm e.g. "notepad.exe" .. this also "hangs".

here is my code:
p.StartInfo.FileName = @"c:\myprog.exe";
p.StartInfo.Arguments = "myArguments";
p.StartInfo.UserName = @"Administrator";
System.Security.SecureString ss = new System.Security.SecureString();
ss.AppendChar('M');
ss.AppendChar('Y');
ss.AppendChar('P');
ss.AppendChar('W');
p.StartInfo.Password = ss;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.WaitForExit();

thanks in advance,

alex
May 22 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
most likely the exe uses a window, and just hangs if it can not create one
(say notepad.exe). you can only run console apps from asp.net.

-- bruce (sqlwork.com)
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> wrote in
message news:uy**************@TK2MSFTNGP05.phx.gbl...
hello,

if i start a program (an exe-file) with Process.Start(...) I don't have
the required permissions that the programm needs (i could start the
programm but the program needs special rights). So I added the
StartInfo.UserName and Password to the Process. Now the program starts,
but it hangs... nothing happens. In the task-manager the process is
created, but it doesn't do anything - no cpu-load and no change of
memory-usage.

What could be the problem? Why hangs the programm? I've tried also an
other programm e.g. "notepad.exe" .. this also "hangs".

here is my code:
p.StartInfo.FileName = @"c:\myprog.exe";
p.StartInfo.Arguments = "myArguments";
p.StartInfo.UserName = @"Administrator";
System.Security.SecureString ss = new System.Security.SecureString();
ss.AppendChar('M');
ss.AppendChar('Y');
ss.AppendChar('P');
ss.AppendChar('W');
p.StartInfo.Password = ss;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.WaitForExit();

thanks in advance,

alex

May 22 '06 #2

P: n/a
it is a console application.

"bruce barker (sqlwork.com)" <b_*************************@sqlwork.com>
schrieb im Newsbeitrag news:Or**************@TK2MSFTNGP05.phx.gbl...
most likely the exe uses a window, and just hangs if it can not create one
(say notepad.exe). you can only run console apps from asp.net.

-- bruce (sqlwork.com)
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> wrote in
message news:uy**************@TK2MSFTNGP05.phx.gbl...
hello,

if i start a program (an exe-file) with Process.Start(...) I don't have
the required permissions that the programm needs (i could start the
programm but the program needs special rights). So I added the
StartInfo.UserName and Password to the Process. Now the program starts,
but it hangs... nothing happens. In the task-manager the process is
created, but it doesn't do anything - no cpu-load and no change of
memory-usage.

What could be the problem? Why hangs the programm? I've tried also an
other programm e.g. "notepad.exe" .. this also "hangs".

here is my code:
p.StartInfo.FileName = @"c:\myprog.exe";
p.StartInfo.Arguments = "myArguments";
p.StartInfo.UserName = @"Administrator";
System.Security.SecureString ss = new System.Security.SecureString();
ss.AppendChar('M');
ss.AppendChar('Y');
ss.AppendChar('P');
ss.AppendChar('W');
p.StartInfo.Password = ss;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.WaitForExit();

thanks in advance,

alex


May 22 '06 #3

P: n/a
I need still help!
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> schrieb im
Newsbeitrag news:eI**************@TK2MSFTNGP02.phx.gbl...
it is a console application.

"bruce barker (sqlwork.com)" <b_*************************@sqlwork.com>
schrieb im Newsbeitrag news:Or**************@TK2MSFTNGP05.phx.gbl...
most likely the exe uses a window, and just hangs if it can not create
one (say notepad.exe). you can only run console apps from asp.net.

-- bruce (sqlwork.com)
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> wrote in
message news:uy**************@TK2MSFTNGP05.phx.gbl...
hello,

if i start a program (an exe-file) with Process.Start(...) I don't have
the required permissions that the programm needs (i could start the
programm but the program needs special rights). So I added the
StartInfo.UserName and Password to the Process. Now the program starts,
but it hangs... nothing happens. In the task-manager the process is
created, but it doesn't do anything - no cpu-load and no change of
memory-usage.

What could be the problem? Why hangs the programm? I've tried also an
other programm e.g. "notepad.exe" .. this also "hangs".

here is my code:
p.StartInfo.FileName = @"c:\myprog.exe";
p.StartInfo.Arguments = "myArguments";
p.StartInfo.UserName = @"Administrator";
System.Security.SecureString ss = new System.Security.SecureString();
ss.AppendChar('M');
ss.AppendChar('Y');
ss.AppendChar('P');
ss.AppendChar('W');
p.StartInfo.Password = ss;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.WaitForExit();

thanks in advance,

alex



May 29 '06 #4

P: n/a
What does this process do? Can you run it manually? does it require user
input? Have you followed the suggestions listed provided?

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> wrote in
message news:%2****************@TK2MSFTNGP04.phx.gbl...
I need still help!
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> schrieb im
Newsbeitrag news:eI**************@TK2MSFTNGP02.phx.gbl...
it is a console application.

"bruce barker (sqlwork.com)" <b_*************************@sqlwork.com>
schrieb im Newsbeitrag news:Or**************@TK2MSFTNGP05.phx.gbl...
most likely the exe uses a window, and just hangs if it can not create
one (say notepad.exe). you can only run console apps from asp.net.

-- bruce (sqlwork.com)
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> wrote in
message news:uy**************@TK2MSFTNGP05.phx.gbl...
hello,

if i start a program (an exe-file) with Process.Start(...) I don't have
the required permissions that the programm needs (i could start the
programm but the program needs special rights). So I added the
StartInfo.UserName and Password to the Process. Now the program starts,
but it hangs... nothing happens. In the task-manager the process is
created, but it doesn't do anything - no cpu-load and no change of
memory-usage.

What could be the problem? Why hangs the programm? I've tried also an
other programm e.g. "notepad.exe" .. this also "hangs".

here is my code:
p.StartInfo.FileName = @"c:\myprog.exe";
p.StartInfo.Arguments = "myArguments";
p.StartInfo.UserName = @"Administrator";
System.Security.SecureString ss = new System.Security.SecureString();
ss.AppendChar('M');
ss.AppendChar('Y');
ss.AppendChar('P');
ss.AppendChar('W');
p.StartInfo.Password = ss;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.WaitForExit();

thanks in advance,

alex



May 29 '06 #5

P: n/a
hi,
the application i want to start is "svn.exe" (Subversion - perhaps you know)
.... If I run it without setting a username and password it starts, but then
it hasn't enough rights to fullfill its task and it gives an error message.
and when i start it with an username and passoword it "hangs". It does
nothing... no error message .. nothing ... it simply hangs and is in the
taskmanger visible. .. with constant ram-usage and no cpu-activity.

what could that be?

alex

"Alvin Bruney" <www.lulu.com/owc> schrieb im Newsbeitrag
news:OV**************@TK2MSFTNGP03.phx.gbl...
What does this process do? Can you run it manually? does it require user
input? Have you followed the suggestions listed provided?

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> wrote in
message news:%2****************@TK2MSFTNGP04.phx.gbl...
I need still help!
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> schrieb im
Newsbeitrag news:eI**************@TK2MSFTNGP02.phx.gbl...
it is a console application.

"bruce barker (sqlwork.com)" <b_*************************@sqlwork.com>
schrieb im Newsbeitrag news:Or**************@TK2MSFTNGP05.phx.gbl...
most likely the exe uses a window, and just hangs if it can not create
one (say notepad.exe). you can only run console apps from asp.net.

-- bruce (sqlwork.com)
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> wrote in
message news:uy**************@TK2MSFTNGP05.phx.gbl...
> hello,
>
> if i start a program (an exe-file) with Process.Start(...) I don't
> have the required permissions that the programm needs (i could start
> the programm but the program needs special rights). So I added the
> StartInfo.UserName and Password to the Process. Now the program
> starts, but it hangs... nothing happens. In the task-manager the
> process is created, but it doesn't do anything - no cpu-load and no
> change of memory-usage.
>
> What could be the problem? Why hangs the programm? I've tried also an
> other programm e.g. "notepad.exe" .. this also "hangs".
>
> here is my code:
> p.StartInfo.FileName = @"c:\myprog.exe";
> p.StartInfo.Arguments = "myArguments";
> p.StartInfo.UserName = @"Administrator";
> System.Security.SecureString ss = new System.Security.SecureString();
> ss.AppendChar('M');
> ss.AppendChar('Y');
> ss.AppendChar('P');
> ss.AppendChar('W');
> p.StartInfo.Password = ss;
> p.StartInfo.UseShellExecute = false;
> p.StartInfo.RedirectStandardError = true;
> p.StartInfo.RedirectStandardOutput = true;
> p.StartInfo.CreateNoWindow = true;
> p.Start();
> p.WaitForExit();
>
> thanks in advance,
>
> alex
>



May 30 '06 #6

P: n/a
no ideas?

how do you start an application with other userrights? perhaps i missed
something.

alex

"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> schrieb im
Newsbeitrag news:OZ**************@TK2MSFTNGP05.phx.gbl...
hi,
the application i want to start is "svn.exe" (Subversion - perhaps you
know) ... If I run it without setting a username and password it starts,
but then it hasn't enough rights to fullfill its task and it gives an
error message.
and when i start it with an username and passoword it "hangs". It does
nothing... no error message .. nothing ... it simply hangs and is in the
taskmanger visible. .. with constant ram-usage and no cpu-activity.

what could that be?

alex

"Alvin Bruney" <www.lulu.com/owc> schrieb im Newsbeitrag
news:OV**************@TK2MSFTNGP03.phx.gbl...
What does this process do? Can you run it manually? does it require user
input? Have you followed the suggestions listed provided?

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> wrote in
message news:%2****************@TK2MSFTNGP04.phx.gbl...
I need still help!
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> schrieb
im Newsbeitrag news:eI**************@TK2MSFTNGP02.phx.gbl...
it is a console application.

"bruce barker (sqlwork.com)" <b_*************************@sqlwork.com>
schrieb im Newsbeitrag news:Or**************@TK2MSFTNGP05.phx.gbl...
> most likely the exe uses a window, and just hangs if it can not create
> one (say notepad.exe). you can only run console apps from asp.net.
>
> -- bruce (sqlwork.com)
>
>
> "Alexander Widera"
> <aw**@hrz.tu-chemnitz.de-novaliddomainpleasedeletethispart.de> wrote
> in message news:uy**************@TK2MSFTNGP05.phx.gbl...
>> hello,
>>
>> if i start a program (an exe-file) with Process.Start(...) I don't
>> have the required permissions that the programm needs (i could start
>> the programm but the program needs special rights). So I added the
>> StartInfo.UserName and Password to the Process. Now the program
>> starts, but it hangs... nothing happens. In the task-manager the
>> process is created, but it doesn't do anything - no cpu-load and no
>> change of memory-usage.
>>
>> What could be the problem? Why hangs the programm? I've tried also an
>> other programm e.g. "notepad.exe" .. this also "hangs".
>>
>> here is my code:
>> p.StartInfo.FileName = @"c:\myprog.exe";
>> p.StartInfo.Arguments = "myArguments";
>> p.StartInfo.UserName = @"Administrator";
>> System.Security.SecureString ss = new System.Security.SecureString();
>> ss.AppendChar('M');
>> ss.AppendChar('Y');
>> ss.AppendChar('P');
>> ss.AppendChar('W');
>> p.StartInfo.Password = ss;
>> p.StartInfo.UseShellExecute = false;
>> p.StartInfo.RedirectStandardError = true;
>> p.StartInfo.RedirectStandardOutput = true;
>> p.StartInfo.CreateNoWindow = true;
>> p.Start();
>> p.WaitForExit();
>>
>> thanks in advance,
>>
>> alex
>>
>
>



May 31 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.