473,416 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

process.start() program hangs

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
6 3347
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times....
7
by: Samantha | last post by:
Hello , I am developping a program for Win98 plateform, and I am stucking with a problem, hope you can help me. I have a program running 2 process : - One process running the Xcopy.exe -...
3
by: JTF | last post by:
Whenever I start an application from ASP.NET, the exe hangs, with Task manager showing no cpu time. Every exe I've tried hangs in the same way (notepad, cmd, ms access). What runs is a .net exe...
1
by: Scott | last post by:
I am trying to write an asp.net web page that will spawn a third party .exe file and return the results back to my asp page. I am able to write a vb.net program that will do this just fine. I...
1
by: Wojtek | last post by:
Hi, I am having problems to fetch the output of a command line program from an ASP.NET application. My code works fine in a regular Forms or command line application, but when running the same...
0
by: wayne hamilton | last post by:
I'm having a problem Interacting with Command Line programs. I can read and write anything I want as long as I don't have to interact with a process once it's started. Originally I had been calling...
7
by: christian13467 | last post by:
Hi, I'm using ASP.Net 2.0 with IIS 6.0 on windows server 2003 sp1. Calling a commandline program or a cmd file using Process.Start inside a webservice method. The call to Process.Start returns...
2
by: test3 | last post by:
Hello folks, I'm using System.Diagnostics.Process to start a thirdparty program (that works perfectly when started via command line). I'm using Process.StandardOutput to get the output of the...
4
by: Steven De Smet | last post by:
Hello, This is my first post. I searched on the internet for answers but I was unable to solve my problem. So I hope that you guy's can help me with my VB.NET problem I tried to create a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.