Note: This answer helps you with the syntax problem of your own attempt; solving that problem alone doesn't necessarily mean that the command will then work as expected - you'd have to consult the documentation for your specific executable, DATABASE12.EXE
.
Your Start-Process
call is syntactically invalid:
All pass-through arguments, including /silent
, must be passed via -ArgumentList
(-Args
)
To pass them individually, use an array, i.e. separate the arguments with ,
Start-Process -Wait DATABASE12.EXE -ArgumentList /silent, ZZZZ-SSS-JJJ-XXXX, INSTALLDIR=c:\temp\App
However, due to a long-standing bug in Start-Process
- see this answer - it is usually better to pass all pass-through arguments encoded in a single string (separated with spaces), which makes it easier to control embedded double-quoting, if necessary:
# Note: Parameter name -ArgumentList omitted for brevity.
Start-Process -Wait DATABASE12.EXE '/silent ZZZZ-SSS-JJJ-XXXX INSTALLDIR=c:\temp\App'