If I do this, it prevents the $dirFiles variable from working.
The reason I'm using Start-Process is because I have many installers one after the other and I want one installer to wait till the one before it finishes. Any help would be appreciated! Thanks
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Hello, I'm working on a Powershell script to install Autodesk products.
I'm having issues with a step and hopefully someone can help.
I've tried this many different ways and keep running into errors.
Using double quotes
(Start-Process "msiexec.exe" -ArgumentList ""/i $dirFiles\ABDS2017\Img\x64\RVT\RVT.msi INSTALLDIR="C:\Program Files\Autodesk\" ADSK_SETUP_EXE=1 /qb!"" -NoNewWindow -Wait -PassThru).ExitCode
Error Cannot validate argument on parameter 'ArgumentList' Argument is null or empty.
Using a variable to define InstallDir
Doing this I get the msiexec /option Required Parameter error.
Tried this also, Single Quotes with Quotes on Path
(Start-Process "msiexec.exe" -ArgumentList "/i $dirFiles\ABDS2017\Img\x64\RVT\RVT.msi INSTALLDIR="C:\Program Files\Autodesk\" ADSK_SETUP_EXE=1 /qb!" -NoNewWindow -Wait -PassThru).ExitCode
I receive A positional parameter cannot be found that accepts argument C:\Program
Using single quotes on InstallDir
(Start-Process "msiexec.exe" -ArgumentList "/i $dirFiles\ABDS2017\Img\x64\RVT\RVT.msi INSTALLDIR='C:\Program Files\Autodesk\' ADSK_SETUP_EXE=1 /qb!" -NoNewWindow -Wait -PassThru).ExitCode
Doing this I get the msiexec /option Required Parameter error.
Using single quotes on the outside
(Start-Process "msiexec.exe" -ArgumentList '/i $dirFiles\ABDS2017\Img\x64\RVT\RVT.msi INSTALLDIR="C:\Program Files\Autodesk\" ADSK_SETUP_EXE=1 /qb!' -NoNewWindow -Wait -PassThru).ExitCode
If I do this, it prevents the $dirFiles variable from working.
The reason I'm using Start-Process is because I have many installers one after the other and I want one installer to wait till the one before it finishes. Any help would be appreciated! Thanks
Share this post
Link to post
Share on other sites