This topic contains 4 replies, has 2 voices, and was last updated by
January 19, 2015 at 10:04 am #21970
I'm trying to save the menu of .\filename.msu /? to a variable. Currently if you enter:
$this = .\filename.msu /? it just displays the microsoft help menu with all the switches available for that .msu file.
Is it possible to save that menu to a varible in text form?
January 19, 2015 at 10:15 am #21971KeymasterTopics: 2Replies: 234Points: 185Rank: Participant
Hey there Aaron!
There's not a lot of switches to the Windows Update Standalone installer. You could just create your own hash table with this link as a reference:
Might I inquire as to what you're attempting?
January 19, 2015 at 10:47 am #21972
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
January 19, 2015 at 6:20 pm #21978KeymasterTopics: 2Replies: 234Points: 185Rank: Participant
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.
January 23, 2015 at 6:55 am #22081
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.
Thanks again for looking into it so diligently!
The topic ‘Saving .msu help menu to variable’ is closed to new replies.