Sure, so I have a auto install script, with hard coded values for the quiet, passive, no restart switches for msu, but it also installs .exe files and I’ve found that some of the switches vary on those installers.
So I wanted to query the /? of the file and then find the switches it does have and that are applicable and run those per that .exe installer
Hey there Aaron. After conferring with some of my colleagues (thanks Stephen!) and doing a little reading, it appears that what you’re looking to do isn’t really possible. While you can pass returns from the command line into PowerShell, it doesn’t work the other way. Even if you were able to pass arguments into the command line, your problem would be compounded with the lack of uniformity when it comes to exe installers. Depending on the tool used to package it, and the switches that the packager decided to allow, you often run into a different set of switches for just about every exe out there.
A possible solution might be OneGet, but it’s not yet “in production”. Your best bet at this point is to either continue with batch files, or use some sort of application deployment tool like SCCM.
Thanks a lot for looking into it Will, I should have stated this is just for microsoft installers (the .exe installs) and was hoping to parse and find certain switches from the menu’s but ohhh well ;/ I may just have to have it sort by error 87 invalid parameters to try the next best ‘guess’ on the switch.