Questions tagged [startprocessinfo]

18 questions
32
votes
6 answers

ProcessInfo and RedirectStandardOutput

I have an app which calls another process in a command window and that process has updating stats that output to the console window. I thought this was a fairly simple operation but I can't seem to get it to work. Am I missing something? string…
Brandon Grossutti
  • 1,241
  • 5
  • 16
  • 24
7
votes
4 answers

Run new process as different user in vb.net

I'm currently using a homegrown method to run a process as a different user in Vista, and I can't escape the feeling that's it hack-ish and less than ideal (in addition to the fact that it craps out UAC, crashing my app with a security exception,…
SqlRyan
  • 33,116
  • 33
  • 114
  • 199
2
votes
1 answer

How to start a 32-bit process in C# without using shell execute on 64-bit machine?

I have an ASP .NET web application on a 64-bit machine that needs to run a legacy 32-bit reporting application. When I run the program with UseShellExecute = false, the program exits with exit code: -1073741502 I can't use Shell Execute because I…
Ryan
  • 2,948
  • 3
  • 30
  • 41
2
votes
1 answer

Opening a command line and reading outputs without closing

I know similar questions are overflowing this website (pun intended), but I cannot find get this to work without closing the .bat file I'm running. I'm sorry that I'm not very skillful at this, but any help is seriously appreciated. What works: //…
Automation
  • 23
  • 3
1
vote
1 answer

How to avoid the Windows (XP) Security Warning when launching a "DOS" command line within C#?

This question is related to this initial question asked a little while ago. Now, that I have chosen the extracting tool, I'm iterating through a given in command line parameter directory and subdirectories to extract the compressed .zip…
Will Marcouiller
  • 23,773
  • 22
  • 96
  • 162
1
vote
1 answer

System.Diagnostics.Process.Start with WindowStyle.Hidden doesn't retun handle

I am trying to open simple .net exe/notepad.exe using process.start in hidden mode. and I need the process handle later to make the application.exe to make it visible after some time. Able to get handle only in WindowStyle.Minimized,…
anand
  • 307
  • 3
  • 14
1
vote
1 answer

Starting .exe with process from C# yields different result than running the .exe directly

I have a custom workflow activity that is run in TFS 2010 Build that uses Process and ProcessInfo classes to start a custom .exe that hosts a WCF service for our unit tests. When the custom .exe is run from my workflow activity that uses Process and…
pgoostree
  • 63
  • 6
0
votes
3 answers

Why is dumping MySQL database programmatically different from dumping via command line?

To dump database from command line, all I need to do is: mysqldump -uroot --password= myDb --routines> "C:\s.sql" So all I would try programmatically is this, which is the direct interpretation of it I suppose: ProcessStartInfo psi = new…
nawfal
  • 70,104
  • 56
  • 326
  • 368
0
votes
1 answer

How to running batch that require updating path?

I want to use C# to call a batch script to install and run programs. This requires me to use two instances, one for the installation and one for the actual run, so that the path is updated. Here is my try: var proc = new…
Ooker
  • 1,969
  • 4
  • 28
  • 58
0
votes
0 answers

How to show progress of python script when using ProcessStartInfo in C#

I am using ProcessStartInfo in C# to run my python script. But i want to know what percentage the python script has processed. I am using below code. Python: import time if __name__ == '__main__': for i in range(100): #do something …
0
votes
0 answers

Console windows collapse on using Start-Process dotnet.exe

I have written a PowerShell script to launch few webjobs in my local machine. My script is working fine and is launching each webjob in a new console window as expected. However, the issue I am facing is that if there is some problem with the…
0
votes
1 answer

How to know in C# process response if git rebase resulted conflict or successful

I am running git commands using Process from cmd.exe, everything works fine, now I am trying to rebase a branch and want to know if rebase got successful then want to run the git push command as next step. Is there any way to know if git rebase got…
Pawan Nogariya
  • 8,330
  • 12
  • 52
  • 105
0
votes
1 answer

Not able to pass arguments with spaces to python script from c#

I am calling python script from c# using ProcessInfoStart method. As an argument it receives JSON and is input to python script. It works fine it we pass JSON without having any spaces but if there is any space then original JSON is splitted till…
Ronak
  • 187
  • 2
  • 17
0
votes
1 answer

Call c# executable in c++ managed and run asynchronously

I would like to run c# executable file abc.exe at the end of c++ managed project main functionality. abc.exe needs to run asynchronously without disturbing the c++ managed project even it encounter any errors. I have found that process run .exe…
0
votes
1 answer

Screen capture command line tool works from command line but when started from inside of UI

Quick version: In my project I have a command line tool that takes screenshots of all windows on the computer (bug collection tool for testing our product). This is part of a command line CollectSystemLogs.exe which collects many things, screenshots…
1
2