Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > process.start() program hangs

Reply
Thread Tools

process.start() program hangs

 
 
Alexander Widera
Guest
Posts: n/a
 
      05-22-2006
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


 
Reply With Quote
 
 
 
 
bruce barker \(sqlwork.com\)
Guest
Posts: n/a
 
      05-22-2006
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"
<> wrote in
message news:uy$...
> 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
>



 
Reply With Quote
 
 
 
 
Alexander Widera
Guest
Posts: n/a
 
      05-22-2006
it is a console application.



"bruce barker (sqlwork.com)" <>
schrieb im Newsbeitrag news:...
> 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"
> <> wrote in
> message news:uy$...
>> 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
>>

>
>



 
Reply With Quote
 
Alexander Widera
Guest
Posts: n/a
 
      05-29-2006
I need still help!


"Alexander Widera"
<> schrieb im
Newsbeitrag news:...
> it is a console application.
>
>
>
> "bruce barker (sqlwork.com)" <>
> schrieb im Newsbeitrag news:...
>> 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"
>> <> wrote in
>> message news:uy$...
>>> 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
>>>

>>
>>

>
>



 
Reply With Quote
 
Alvin Bruney
Guest
Posts: n/a
 
      05-29-2006
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"
<> wrote in
message news:%...
>I need still help!
>
>
> "Alexander Widera"
> <> schrieb im
> Newsbeitrag news:...
>> it is a console application.
>>
>>
>>
>> "bruce barker (sqlwork.com)" <>
>> schrieb im Newsbeitrag news:...
>>> 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"
>>> <> wrote in
>>> message news:uy$...
>>>> 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
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Alexander Widera
Guest
Posts: n/a
 
      05-30-2006
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:OV6Bz$...
> 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"
> <> wrote in
> message news:%...
>>I need still help!
>>
>>
>> "Alexander Widera"
>> <> schrieb im
>> Newsbeitrag news:...
>>> it is a console application.
>>>
>>>
>>>
>>> "bruce barker (sqlwork.com)" <>
>>> schrieb im Newsbeitrag news:...
>>>> 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"
>>>> <> wrote in
>>>> message news:uy$...
>>>>> 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
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Alexander Widera
Guest
Posts: n/a
 
      05-31-2006
no ideas?

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

alex



"Alexander Widera"
<> schrieb im
Newsbeitrag news:...
> 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:OV6Bz$...
>> 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"
>> <> wrote in
>> message news:%...
>>>I need still help!
>>>
>>>
>>> "Alexander Widera"
>>> <> schrieb
>>> im Newsbeitrag news:...
>>>> it is a console application.
>>>>
>>>>
>>>>
>>>> "bruce barker (sqlwork.com)" <>
>>>> schrieb im Newsbeitrag news:...
>>>>> 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"
>>>>> <> wrote
>>>>> in message news:uy$...
>>>>>> 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
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gem hangs => TCPSocket.write hangs Tim Shadel Ruby 1 07-24-2005 06:11 AM
Max number of operations? (Good WAVE converter program hangs with "long" input files) Alex Ochoa Java 4 01-18-2005 03:30 PM
Clear hangs up - & hangs up - & hangs up Sue Bilstein NZ Computing 26 03-07-2004 01:33 AM
Java program hangs on new PrintWriter Oz Levanon Java 1 03-01-2004 01:44 AM
Dos program exit hangs Windows fhg Computer Support 1 01-17-2004 05:47 PM



Advertisments