I am trying to develop a script to run 2 .exe with parameters. It will be run in silent mode and both also are norestart. I am running into problems. Any suggestions?
First: Share your code, please! (formatted as code using the code tags “PRE”)
Second: Descibe as detailed as possible what you’ve done and what did not work as expected. Please keep in mind: we cannot see your screen and we cannot read your mind. ![]()
A number of options exist, what have you got so far?
Sorry…I meant to supply this.
vcredist_x86.exe /q /repair /norestart -wait
vcredist_x64.exe /q /repair /norestart
You wrote you ran in some problems … ???
$exe = ".\vcredist_x86.exe","vcredist_x64.exe"
$argumentlist = "/q /repair /norestart"
foreach ($e in $exe){
Start-Process -FilePath $e -ArgumentList $argumentlist -Wait
}
Having issues. Here is my script that I modified to add the full path:
Start-Process : This command cannot be run due to the error: The operation was canceled by the user.
At line:5 char:5
-
Start-Process -FilePath $e -ArgumentList $argumentlist -Wait -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - CategoryInfo : InvalidOperation: (
[Start-Process], InvalidOperationException - FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Tried this:
$Path86 = "\\tutilitynas\tutility\Microsoft\ServicePacksandHotFixes\InstallMedia\SecurityPatches\SQL\vcredist_x86.exe"$Path64 = “\tutilitynas\tutility\Microsoft\ServicePacksandHotFixes\InstallMedia\SecurityPatches\SQL\vcredist_x64.exe”
$ArguementList =“/q /repair /norestart”
Start-Process -filepath $Path86 -ArgumentList $ArguementList -wait
Start-Process -filepath $Path64 -ArgumentList $ArguementList