473,770 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.UserN ame 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.ex e" .. this also "hangs".

here is my code:
p.StartInfo.Fil eName = @"c:\myprog.exe ";
p.StartInfo.Arg uments = "myArgument s";
p.StartInfo.Use rName = @"Administrator ";
System.Security .SecureString ss = new System.Security .SecureString() ;
ss.AppendChar(' M');
ss.AppendChar(' Y');
ss.AppendChar(' P');
ss.AppendChar(' W');
p.StartInfo.Pas sword = ss;
p.StartInfo.Use ShellExecute = false;
p.StartInfo.Red irectStandardEr ror = true;
p.StartInfo.Red irectStandardOu tput = true;
p.StartInfo.Cre ateNoWindow = true;
p.Start();
p.WaitForExit() ;

thanks in advance,

alex
May 22 '06 #1
6 3385
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-novaliddomainpl easedeletethisp art.de> wrote in
message news:uy******** ******@TK2MSFTN GP05.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.UserN ame 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.ex e" .. this also "hangs".

here is my code:
p.StartInfo.Fil eName = @"c:\myprog.exe ";
p.StartInfo.Arg uments = "myArgument s";
p.StartInfo.Use rName = @"Administrator ";
System.Security .SecureString ss = new System.Security .SecureString() ;
ss.AppendChar(' M');
ss.AppendChar(' Y');
ss.AppendChar(' P');
ss.AppendChar(' W');
p.StartInfo.Pas sword = ss;
p.StartInfo.Use ShellExecute = false;
p.StartInfo.Red irectStandardEr ror = true;
p.StartInfo.Red irectStandardOu tput = true;
p.StartInfo.Cre ateNoWindow = true;
p.Start();
p.WaitForExit() ;

thanks in advance,

alex

May 22 '06 #2
it is a console application.

"bruce barker (sqlwork.com)" <b_************ *************@s qlwork.com>
schrieb im Newsbeitrag news:Or******** ******@TK2MSFTN GP05.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-novaliddomainpl easedeletethisp art.de> wrote in
message news:uy******** ******@TK2MSFTN GP05.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.UserN ame 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.ex e" .. this also "hangs".

here is my code:
p.StartInfo.Fil eName = @"c:\myprog.exe ";
p.StartInfo.Arg uments = "myArgument s";
p.StartInfo.Use rName = @"Administrator ";
System.Security .SecureString ss = new System.Security .SecureString() ;
ss.AppendChar(' M');
ss.AppendChar(' Y');
ss.AppendChar(' P');
ss.AppendChar(' W');
p.StartInfo.Pas sword = ss;
p.StartInfo.Use ShellExecute = false;
p.StartInfo.Red irectStandardEr ror = true;
p.StartInfo.Red irectStandardOu tput = true;
p.StartInfo.Cre ateNoWindow = true;
p.Start();
p.WaitForExit() ;

thanks in advance,

alex


May 22 '06 #3
I need still help!
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpl easedeletethisp art.de> schrieb im
Newsbeitrag news:eI******** ******@TK2MSFTN GP02.phx.gbl...
it is a console application.

"bruce barker (sqlwork.com)" <b_************ *************@s qlwork.com>
schrieb im Newsbeitrag news:Or******** ******@TK2MSFTN GP05.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-novaliddomainpl easedeletethisp art.de> wrote in
message news:uy******** ******@TK2MSFTN GP05.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.UserN ame 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.ex e" .. this also "hangs".

here is my code:
p.StartInfo.Fil eName = @"c:\myprog.exe ";
p.StartInfo.Arg uments = "myArgument s";
p.StartInfo.Use rName = @"Administrator ";
System.Security .SecureString ss = new System.Security .SecureString() ;
ss.AppendChar(' M');
ss.AppendChar(' Y');
ss.AppendChar(' P');
ss.AppendChar(' W');
p.StartInfo.Pas sword = ss;
p.StartInfo.Use ShellExecute = false;
p.StartInfo.Red irectStandardEr ror = true;
p.StartInfo.Red irectStandardOu tput = true;
p.StartInfo.Cre ateNoWindow = 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-novaliddomainpl easedeletethisp art.de> wrote in
message news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
I need still help!
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpl easedeletethisp art.de> schrieb im
Newsbeitrag news:eI******** ******@TK2MSFTN GP02.phx.gbl...
it is a console application.

"bruce barker (sqlwork.com)" <b_************ *************@s qlwork.com>
schrieb im Newsbeitrag news:Or******** ******@TK2MSFTN GP05.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-novaliddomainpl easedeletethisp art.de> wrote in
message news:uy******** ******@TK2MSFTN GP05.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.UserN ame 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.ex e" .. this also "hangs".

here is my code:
p.StartInfo.Fil eName = @"c:\myprog.exe ";
p.StartInfo.Arg uments = "myArgument s";
p.StartInfo.Use rName = @"Administrator ";
System.Security .SecureString ss = new System.Security .SecureString() ;
ss.AppendChar(' M');
ss.AppendChar(' Y');
ss.AppendChar(' P');
ss.AppendChar(' W');
p.StartInfo.Pas sword = ss;
p.StartInfo.Use ShellExecute = false;
p.StartInfo.Red irectStandardEr ror = true;
p.StartInfo.Red irectStandardOu tput = true;
p.StartInfo.Cre ateNoWindow = 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******** ******@TK2MSFTN GP03.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-novaliddomainpl easedeletethisp art.de> wrote in
message news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
I need still help!
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpl easedeletethisp art.de> schrieb im
Newsbeitrag news:eI******** ******@TK2MSFTN GP02.phx.gbl...
it is a console application.

"bruce barker (sqlwork.com)" <b_************ *************@s qlwork.com>
schrieb im Newsbeitrag news:Or******** ******@TK2MSFTN GP05.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-novaliddomainpl easedeletethisp art.de> wrote in
message news:uy******** ******@TK2MSFTN GP05.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.UserN ame 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.ex e" .. this also "hangs".
>
> here is my code:
> p.StartInfo.Fil eName = @"c:\myprog.exe ";
> p.StartInfo.Arg uments = "myArgument s";
> p.StartInfo.Use rName = @"Administrator ";
> System.Security .SecureString ss = new System.Security .SecureString() ;
> ss.AppendChar(' M');
> ss.AppendChar(' Y');
> ss.AppendChar(' P');
> ss.AppendChar(' W');
> p.StartInfo.Pas sword = ss;
> p.StartInfo.Use ShellExecute = false;
> p.StartInfo.Red irectStandardEr ror = true;
> p.StartInfo.Red irectStandardOu tput = true;
> p.StartInfo.Cre ateNoWindow = 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-novaliddomainpl easedeletethisp art.de> schrieb im
Newsbeitrag news:OZ******** ******@TK2MSFTN GP05.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******** ******@TK2MSFTN GP03.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-novaliddomainpl easedeletethisp art.de> wrote in
message news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
I need still help!
"Alexander Widera"
<aw**@hrz.tu-chemnitz.de-novaliddomainpl easedeletethisp art.de> schrieb
im Newsbeitrag news:eI******** ******@TK2MSFTN GP02.phx.gbl...
it is a console application.

"bruce barker (sqlwork.com)" <b_************ *************@s qlwork.com>
schrieb im Newsbeitrag news:Or******** ******@TK2MSFTN GP05.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-novaliddomainpl easedeletethisp art.de> wrote
> in message news:uy******** ******@TK2MSFTN GP05.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.UserN ame 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.ex e" .. this also "hangs".
>>
>> here is my code:
>> p.StartInfo.Fil eName = @"c:\myprog.exe ";
>> p.StartInfo.Arg uments = "myArgument s";
>> p.StartInfo.Use rName = @"Administrator ";
>> System.Security .SecureString ss = new System.Security .SecureString() ;
>> ss.AppendChar(' M');
>> ss.AppendChar(' Y');
>> ss.AppendChar(' P');
>> ss.AppendChar(' W');
>> p.StartInfo.Pas sword = ss;
>> p.StartInfo.Use ShellExecute = false;
>> p.StartInfo.Red irectStandardEr ror = true;
>> p.StartInfo.Red irectStandardOu tput = true;
>> p.StartInfo.Cre ateNoWindow = 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
6593
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. There is no consistency when it fails. Could anyone here shed some light on how to debug/resolve the issue. I guess IBM looked at the issue and were not able to pinpoint where the issue is. When the program hangs and when force the DB2...
7
3351
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 - When the first process is finished, it runs another Exe process (HHC.exe) The code is below:
3
1435
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 and a .bat file, but the program they start hangs! Same results with system.diagnostics.process and shell. I really need help on this one... Thanks
1
1686
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 redirect the output to a msgbox and display it on the screen. However, when I put this as an asp.net web page, the process just hangs. I am able to do other processes from the same web page and get the results, but when I try to launch this one...
1
2768
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 code in ASP.NET it hangs indefinitely. I can see in the Task Manager that the command line started, but when going through it with the debugger it seems to hang when calling the WaitForExit() method on the Process instance. I can start any other...
0
1672
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 'test.bat' directly, and in the latest incarnation (below) I am starting up cmd.exe and then writing the commands I want to execute to the command line that way. My problem is that I need to know if a program is waiting for input. In my batch...
7
5618
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 once after restarting the iis. A second call to my webservice method never returns. I found some post wich where fixed checking access rights. I added ASPNET to administrators group with no success.
2
6880
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 program. That works for 95 %, but the other 5 % it doesn't. It seems to me that the started process just hangs, and therefor my program hangs, too (p.WaitForExit()). I researched that this only happens when the output of the program is longer than...
4
8847
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 windows service that converts MS Word Files into .PDF files and after that we want to zip the .PDF files. Our code: Protected Overrides Sub OnStart(ByVal args() As String) ' Add code here to start your service. This method should set...
0
9618
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9906
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.