Jul 28 2022 07:33 AM
Jul 28 2022 07:33 AM
I think there is something I am missing that when I try to run the installer for an msp file and using this syntax it stops and brings the windows installer window.
Start-Process msiexec.exe -FilePath "$Installdir\AcrobatDCx64Upd2200120169.msp" -ArgumentList "/sAll /rs /rps /msi /norestart /quiet EULA_ACCEPT=YES"
Am I missing something?
Jul 28 2022 07:51 PMSolution
You've provided the parameters incorrectly.
First, here's the commandlet's reference article:
Next, here are the issues from your command line:
So, what should the command look like? (noting that I haven't not bothered checking the validity of the msiexec.exe parameters)
Start-Process -FilePath msiexec.exe -ArgumentList @("/p", "$Installdir\AcrobatDCx64Upd2200120169.msp", "/sAll", "/rs", "/rps", "/msi", "/norestart", "/quiet EULA_ACCEPT=YES");
Aug 03 2022 05:22 AM
Aug 16 2022 09:17 AM
@LainRobertson Hi Lain,
Thanks for the correct format. I know the installdir is not specified
Start-Process -FilePath msiexec.exe -ArgumentList @("/p", "$Installdir\ndp48-x86-x64-allos-enu.exe", "/sAll", "/rs", "/rps", "/msi", "/norestart", "/quiet EULA_ACCEPT=YES");
I still get the msiexec popup
Aug 16 2022 07:24 PM
Yeah, that makes sense as a good number of those parameters do not relate to msiexec.exe at all which is what's causing the msiexec help box to appear.
My guess is those options relate to the Acrobat product, not msiexec, in which case trying to pass them as switches (which is anything where the first character is the forward slash) will continue to cause the help box to appear.
If they're defined as properties within the base MSI or the MSP, then you just need to remove the leading forward slash. If they're not properties, then you would be best to use Adobe Reader customisation wizard:
Until you sort out the bad parameters, you'll keep seeing that help dialog windows popping up. It's not a problem with Start-Process or PowerShell in this case.
PS: I got curious just before hitting post and had a read of Adobe's command line examples, and it's very misleading.
Near the top under the heading of "MSI usage", there is a table where your "/sAll" parameter is listed, so I can see why you are trying these parameters directly against msiexec.exe. However, many of the switches in this table do not relate to msiexec.exe at all, but rather the Adobe bootstrapper (which is mentioned in the description after the heading but you can very, very easily miss the significance of what that means.)
So, the following parameters will not work with msiexec.exe the way you're doing it now. They're intended to be included in the setup.ini instead, when using that .ini file in conjunction with the Adobe bootstrapper:
Honestly, just use the Reader customisation wizard to make the relevant changes - ideally as a transform (MST file specified using the TRANSFORMS= property as a parameter - see below). You can save the modified MSI or MSP directly but that's bad practice.
Anyhow, none of this has anything to do with your PowerShell, which is already structured just fine.