275 questions
2 votes
3 answers
152 views
Calling exe with Start-Process is not getting arguments correctly
I have a tool for editing the VersionInfo portion of our executables so that we can tie all of the different components to one installer part number. The tool I am using is resourcehacker (https://www....
1 vote
1 answer
109 views
Got stuck while compiling with cmake using msvc 14.3
Here are some basic infos before my question. use msvc compiler inside visual studio 2022 with toolset v143 use cmake, the version is 4.0.3 the platform is windows 11 Here are the problems I met: I ...
1 vote
2 answers
119 views
PowerShell Start-Process wrapper always fails and doesn’t capture child exit code
I'm using a setup.ps1 script to launch a (bunch of) child PowerShell scripts each from a new PowerShell process and tries to capture the script's exit code to determine if it succeeded using a helper ...
1 vote
1 answer
150 views
How to capture the output of Start-Process into a variable
I am trying to use Start-Process to elevate a Get-WinEvent command, I want to use -Verb RunAs to generate the authentication pop up window, however I can't figure out how to capture the output (which ...
1 vote
2 answers
99 views
Invoke-Command and/or Start-Process fail if no user session is active on the remote system
tl;dr If I locally start Invoke-Command to start an EXE file remotely, it fails, if there is no active user session on the remote system. I am facing the challenge of installing an application with ...
0 votes
0 answers
43 views
Passing string variables with Start-Process powershell.exe [duplicate]
Good evening everyone, Im trying to remove some stuff and it must be in a separate powershell window. The problem is than i cannot pass the path variable to that powershell Window, it should be ...
1 vote
1 answer
68 views
Powershell: Array of Buttons with Link
How can I assign a link to each button? I can't manged it... I dont speak english well. Sorry for the translation... $ButtonName =@('Option One', 'Option Two', 'Option Three') $i = 0 $ButtonName | ...
1 vote
2 answers
117 views
Using start-process in a loop, where some programs will have arguments and some don't; Way to not have if $Arguments -ne $null
I have the below code line, in a script that iterates through things to install from a repository. Some things have arguments, some don't. Have come across one that doesn't, and trying to avoid having ...
0 votes
1 answer
172 views
PS1 Restart service as specified user
I'm trying to create a PS1 script to restart a service in a computer, where the user has no admin right, so i'm trying to execute as de admin user, now i'm trying first to open Notepad, but when I ...
1 vote
1 answer
1k views
How can I call powershell.exe via Start-Process, to then call a script with its own parameters and capture the exit code?
I can't figure out the syntax for this, I have a config script that needs to be called from another script. When I call the config script manually, it looks like this config.ps1 -val1 "1234" ...
2 votes
3 answers
610 views
How to pass environment variables to Start-Process using ArgumentList?
I'd like to be able to pass environment variables from one PowerShell process to another. I have an "entrypoint" script, let's call it Script1.ps1. From Script1.ps1, I would like to pass an ...
0 votes
2 answers
216 views
Start-Process ArgumentList wont work properly in Powershell
I am trying to start a java-process with Start-Process in Powershell. I am passing the parameters in the ArgumentList but it seems to cut the argumentlist after a bit. This is what I have tried: Start-...
1 vote
0 answers
46 views
Why does Start-Process Powershell -Command .... length limit change with -Credential?
Powershell has Start-Process cmdlet (start a new process) which can be a new powershell and get it to run whatever e.g. via -Command & {scriptblock} . Limitation on/after ‘-Command ‘ of 32,760 ...
0 votes
0 answers
64 views
Start-Process is failing to continue after devenv.com has exited
I'm launching devenv.com from a powershell script in order to perform a rebuild on my .sln project. After the build is done, I then do some other tasks such as copying files etc. I'm calling devenv....
1 vote
1 answer
220 views
start-process : The input object cannot be bound to any parameters for the command
I am adding the Powershell task in the Azure pipeline to start the exe by taking the commands in the pipe and starting the process with two argument lists. Also I have to wait for the exe to load with ...