-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win_pkg: msiexec parameter does not allow MSP patch files to be applied #32780
Comments
@morganwillcock, thanks for the report. Ping @TheBigBear, @twangboy. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
ping me @damon-atkins |
Thank you for updating this issue. It is no longer marked as stale. |
Was encountering this issue but the workaround described of setting a minion_cache_path was not working as it was not picking up the saltenv correctly. I was running with a saltenv=test and the msi install files were being cached at:
The |
This approach does sadly not work with Microsoft Monitoring Agent and it's .msp-patches, it is probably something with how the msi is packaged, and will result in a broken install with a error message like '"Error 1923 Service '@C:\Windows\system32\AdtAgent.exe,-500' (AdtAgent) could not be installed. Verify that you have sufficient privileges to install system services."'. One approach that did work for the installation it self was to create one package installer for the main installation, then another installer for the patch with the example from @sbarnden using the /update-parameter. Doing this will install both the msi and msp successfully for Microsoft Monitoring Agent, but Salt pkg.install will not see that the installation with the .msp-patch was successfully, even tho it was. pkg.install stage 1 (msi install)
pkg.install stage 2 (msp install)
Event Log in Windows confirms installation and patching was successfull, but pkg.install for msiexec interpret the output from the msiexec patching as failed, so it will need to be changed to correctly interpret the output as successful.
|
When creating a package definition, setting "msiexec: True" forces the msiexec option "/i" for installs, or "/x" for uninstalls. This prevents the use of the "/p" which is used to apply a patch to an already installed MSI package. A patch may increase the version number and so is potentially equivalent to a package upgrade.
As a workaround, without resorting to hard-coding paths or running batch files, you can glue together the fully qualified location of the minion cache and reference that to apply a patch:
...but this doesn't look too pretty when all that was required was to run
msiexec /p MyApp553.msp /qn /norestart
. It also results in the whole directory being re-hashed since both the original installer and the patch file must be referenced.I would like to suggest the addition of an extra package definition parameter, which when set would imply the msiexec option "/p" in-place of option "/i", e.g. "msiexec_patch: True".
Tested on Salt version 2015.8.8.2
The text was updated successfully, but these errors were encountered: