Questions tagged [process.start]
The Start() method on the .NET System.Diagnostics.Process class for starting applications from within a program
512
questions
0
votes
0
answers
10
views
How to use Process.Start(exepath) to start a UIA/UIPI app fails - requires elevated permissions
ApplicationA has special UIA / UIPI permissions in its Windows manifest because it does accessibility stuff. I am trying to use Process.Start() in application B to start the exe file for AppA, but ...
-4
votes
0
answers
25
views
Why My account Sagemakerlab can't start runtime always get something wrong?
Why My account Sagemakerlab can't start runtime always get something wrong?
I tried to start runtime but system told me "something went wrong. Please try again later"
1
vote
2
answers
40
views
How do I wait for an Explorer window to finish opening?
Full repro example (.NET Framework 4.8 Console application, Windows 10):
using System.Diagnostics;
using System.Windows.Forms;
static class Program
{
static void Main()
{
var p = ...
0
votes
1
answer
47
views
Process.Start can not open a file based on the extension
If I write into the command prompt
c:\Data\a.xls
c:\Data\b.pdf
c:\Data\c.txt
then the corresponding files are opened with the default application. I could do the same from program.
Process.Start(@&...
0
votes
0
answers
35
views
Process start won’ t work on ils release server
Im trying to print a generated pdf on my web app in c# asp.net.
Im using iis.
I need to print the file on a specific printemps over our network. The fact is that in my dev server environnement, in ...
0
votes
0
answers
41
views
Process start as different user - access is denied
When I try to start a file using different user privilege on c# it's always failed on "access is denied".
SecureString password = new SecureString();
password.AppendChar('n');
password....
0
votes
0
answers
32
views
c# Open file with Process.Start and show Previous and Next button in MS Photos app
I need to open files for which I don't know the extension. I use Process.Start() to open the file in the default program. And it works but there is a problem.
If I open an image (from a folder that ...
0
votes
1
answer
22
views
How to get a new process to know the location of dotnet in Linux?
Our test and development team has been working to implement and test a new version of our software using .NET 6 that we will be releasing early next year. For test's part, we have had to upgrade all ...
0
votes
2
answers
173
views
Using Process.Start to run a .NET 6 dll
I want to start a process with some arguments out of a .NET 6 console application to run a dll that was also created in .NET 6.
When I try to cmd:
> dotnet myPath/myApp.dll testParam everything ...
0
votes
0
answers
62
views
C# Process Start: Programmatically open .cs file and navigate to line number
I'm curious if there is a way for a .cs file to programmatically open and navigate to a c# line of code (similar to ctrl + g)
via
public static System.Diagnostics.Process Start (string fileName, **...
1
vote
1
answer
225
views
Why does process.start() only accept batch, not PowerShell script?
In this script, if I use a batch file, it works:
private async void cmdRunBatchFile2_Click(object sender, EventArgs e)
{
cmdRunBatchFile2.Enabled = false;
await Task....
0
votes
0
answers
46
views
c# Google chrome crashes on some PCs when I open the url from Process.Start(url)
On some PCs Google Chrome crashes when I want to display a url.
I used Process.Start(url) and UseShellExecute = true.
Note that it works normally on most of the PCs I tried it on, but on some it doesn'...
0
votes
2
answers
91
views
Qt application hangs on process.start() function. Happens only when function is being called from QML script
I have Embedded Qt applicaiton runing on my HMI screen.
I am trying to execute some commands to execute in cmd.
I am calling this c++ function simply from QML.
Everytime I call it it hangs on process....
0
votes
1
answer
121
views
'The system cannot find the file specified' when starting conhost process
When I use the code down below to start a cmd window and move it into a panel, everything works OK. But when I replace cmd with conhost, it fails with the following error: 'The system cannot find the ...
0
votes
0
answers
66
views
Stopped at System.Diagnostics.Process.Start - OAuth 2.0 to Google for Windows apps
I am following below libraries and samples to help me implement the OAuth 2.0 flow described form this Gooolge’s developers recommend codes(https://github.com/googlesamples/oauth-apps-for-windows/blob/...
0
votes
0
answers
48
views
Executing a bash script takes much more time when using Process.Start than when using regular console
First time poster, over 10 years reader :)
The issue:
I made a simple bash script:
#/bin/bash
date >> test.db
tac /Users/user/Desktop/catalina.out.2022-06-17-06H30M | grep [Info] | grep -m 1000 &...
0
votes
1
answer
89
views
DirectX app unable to load through Process.Start on Windows Server 2012 R2, works fine through CMD or on local machine
I have an app that runs DirectX 11 that plays a scene and generates an mp4.
I am trying to launch it through Process.Start so that I can manage the process and force it to timeout if it crashed or ...
0
votes
0
answers
139
views
In C# I want to wait until I close the browser(In case of default browser). For Specific browser like Chrome or MsEdge I am able to wait
I have Implemented the following code,
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
...
1
vote
1
answer
145
views
C# fetch all text from git log command
I am trying to obtain all the text from the git log command via C# Process.Start.
I need the full output for a tool that i am working on.
The problem I am facing is that UseShellExecute = false ommits ...
0
votes
0
answers
68
views
Process.StartInfo and Sending arguments
I'm making a compiled program for my company. Currently, we have several functions in separate programs, so to make it easier, decide to combine them all in one. However, the license generation ...
0
votes
1
answer
47
views
c# process start it only outputs when the application is closed Problem
iam develop game server launcher when i am start Multi Theft Auto server no write output but when server closed program write output:
private static Process p = new Process();
public static void ...
0
votes
0
answers
57
views
vb.net process.start replaces clipboard content
When I execute a program (any program) using Process.Start (for example Process.Start("explorer.exe", "C:\Program Files\Google\Chrome\Application\chrome.exe")), the contents of my ...
0
votes
0
answers
277
views
Failed to create an ipc port, Access denied with my Process.start() in Asp.net core
I wrote a little web api using ASP.net core.
In this API i have to launch an EXE, wait for execution, then push an answer to the client who invoke my API.
After a few use of this API, my process.start ...
4
votes
1
answer
4k
views
C# .NET 6 - How to open a link in default browser? [duplicate]
I want to open a website with the default browser. In .NET Framework I always used Process.Start("https://google.com") but when I do this in .NET 6, I get an exception saying that the File ...
0
votes
0
answers
184
views
Running an .exe on Android using Xamarin.Forms
I'm trying to build an Android app using Xamarin.Forms based on a Windows Desktop Application that I programmed. In that program, I ran an .exe using Process.Start(), but it doesn't seem to work for ...
0
votes
1
answer
81
views
Process.Start not executing .exe after publish on IIS 10
I have one tool(Consider name "abc") which trigger some stream.str to be executed. I have prepared one ASP.NET Core API application to run that tool abc.exe after execution this exe as a ...
0
votes
0
answers
393
views
Run though edge or IE window processes and get url
so let me start out by stating I'm launching a 3rd party app via a url call with process.start. Normally this window has a title and I can search through running processes and find that title and kill ...
0
votes
0
answers
450
views
Use Process.Start to open explorer.exe window to UNC path that requires login
I would like to open a Windows Explorer window to a UNC path that requires a login outside of my network using System.Diagnostics.Process.Start. I do not want or need to pass credentials to actually ...
-1
votes
1
answer
345
views
C# Process.Start() with multiple arguments do not work (nmap)
Description
At the moment I am trying to call "nmap" through C# Process.Start(). But I can't get it work with my desired input arguments.
At Process.Start() it seems to make a false parsing ...
0
votes
0
answers
22
views
C# - wpf: start and close instance of calculator.exe or explorer.exe
I am trying to make an application that starts on windows in order to have a controlled environment, but when I try to open explorer or the windows calculator, the process opens and closes instantly ...
1
vote
1
answer
365
views
How to open a specific URL
I want to open an url with
Process.Start("https://www.youtube.com/watch?v=8_oOES_uKPI");
When I run my code I get the following error:
System.ComponentModel.Win32Exception: 'An error ...
0
votes
0
answers
94
views
Application run by Process.Start blocking files even after Close and end of Using
I am running an application in a loop using Process.Start sometimes that application gets stuck (can't modify it) and I shut it down with .Close() if it hasn't update. However, the application creates ...
2
votes
0
answers
745
views
ASP.Net Core inside Docker Container Process.Start() System.ComponentModel.Win32Exception (8): Exec format error
I have been trying to call a process inside a docker container.
ProcessStartInfo pStart = new ProcessStartInfo();
pStart.FileName = fileName;
pStart.Arguments = arguments;
...
0
votes
1
answer
37
views
Trying to launch PhotoViewer in C# but am getting conflicting information. What do I need to do?
I am using C# in Windows 11.
PhotoViewer is the default app for AVI files on my PC. I am trying to launch PhotoViewer with an AVI file using the "Process.Start" method as follows:
MessageBox....
0
votes
0
answers
2k
views
System.ComponentModel.Win32Exception: 'The specified executable is not a valid application for this OS platform.' when trying to launch a shortcut
I have been trying to launch Microsoft Teams through C#, by launching the shortcut.
However I am getting an error:
System.ComponentModel.Win32Exception: 'The specified executable is not a valid ...
1
vote
1
answer
127
views
Microsoft Real time protection crashes calling program with .NET Process.Start
I have a software integration program that will launch other applications. A recent Windows 10 update has resulted in the calling application locking up even though the other applications launch.
In ...
1
vote
1
answer
124
views
Setting up ProcessStartInfo for C# process from CreateProcessAsUser with CREATE_SUSPENDED flag and JobObject
In my C# program, I need to (1) create a process in a suspended state and (2) modify the token. I am doing this so that I can register it to a JobObject so that if the parent process dies unexpectedly ...
0
votes
1
answer
283
views
Batch file that utilizes mingw32 will start manually in Explorer, but immediately closes when using Process.Start() C#
I'm using Visual Studio 2019 and C# Windows Forms.
I'm trying to execute a batch file that contains the following commands:
C:\\devkitPro\\msys2\\msys2_shell.cmd -mingw32 -c "cd /d/HelloWorld/...
0
votes
1
answer
533
views
How to open a pdf file in browser
At the end of our software installation, if the user enabled a check box and click the finish button, it will open a pdf file. It is opened through the below code,
Process.Start(<pdf file path>)
...
1
vote
1
answer
135
views
How do I open a file with a specific application rather than its default application?
I am trying to open files using a specified executable; just like as if you were to right mouse click on a file then scroll to "Open with"
I tried what kaymaf said and reviewed the docs, ...
0
votes
0
answers
129
views
File is empty when I open it with Process.Start(*vscode.exe-path*, *file path*)
I want to allow user to load a python project in VSCode from my application. The user is given a list of projects from which he chooses one and on click should open in VSCode. Projects folders and ...
0
votes
0
answers
682
views
How to fix OS command-line injection from C# process.start?
I am writing a console application , which accepts a command line argument and runs a bat file.
I use process.start() for running a bat file. Example code snippet below
static void Main(string[] ...
1
vote
1
answer
117
views
Is it possible to hide hourglass during Process Start?
Background
I am working on a application that make extensive use of SetParent functionality in order to play several video players into a single application while keeping memory of main applicaton ...
0
votes
1
answer
126
views
Issues with Button not changing when using Process.Start() in Blazor
I am having an issue where I want to change the button text while running a Process.Start().
Here's what I have:
<button class="btn-lg btn- @ButtonClass" disabled="@IsDisabled" @...
0
votes
0
answers
180
views
Pass multiple parameters to powershell file through Process.Start
I'm having an issue on passing multiple parameters for a powershell file to run through Process.Start. This is what I have so far
strCmdText = "/c powershell.exe -file " +...
1
vote
0
answers
363
views
Sending and receiving data via tcp sockets to a remote running process in Dart
Just mucking around with Dart at the moment to try to create a simple use case. The goal is to run a command-line process of choice on a Windows system and then interact with it remotely via a ...
0
votes
1
answer
75
views
Prompt user for input from application started via Process.start()
I am currently creating a console application to interact with git. This works fine with redirecting the output of my command to the console application but now some commands prompt for inputs like ...
0
votes
2
answers
886
views
Why i can't launch Robocopy with Process.Start
I want to run a Robocopy command from my code but it dosn't want to run.
Here's my code:
ProcessStartInfo startInfo = new ProcessStartInfo("CMD.EXE");
startInfo.Arguments = string.Format(&...
-4
votes
1
answer
306
views
How can I run an exe file with c# (I can't use Process.Start() because I don't know the exe file's location)
I want to run an exe file with c# but I can't use Process.Start() because I don't know the exe file's location.
I didn't start to writing so I don't have any code for now.
0
votes
0
answers
25
views
Process.Start removing text from textboxes on other forms
I have a program that stores client information, as the program has evolved I have moved some data over to two other forms (a demographics form and a treatment plan form). On the main page I have a ...