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 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
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
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
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
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 >
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 >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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:
|
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
|
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...
|
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...
| |
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...
|
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.
|
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...
|
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...
|
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...
|
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...
| |
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |