From 7935df0b77ecfd188d73002bdcb9be7097d2166b Mon Sep 17 00:00:00 2001 From: David Boucha Date: Thu, 14 Feb 2013 17:26:50 -0700 Subject: [PATCH] Add msiexec option to the install --- salt/modules/win_pkg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/salt/modules/win_pkg.py b/salt/modules/win_pkg.py index e182b5e495..035e5627cd 100644 --- a/salt/modules/win_pkg.py +++ b/salt/modules/win_pkg.py @@ -310,7 +310,7 @@ def refresh_db(): return True -def install(name=None, refresh=False, **kwargs): +def install(name=None, refresh=False, msiexec=False, **kwargs): ''' Install the passed package @@ -344,6 +344,8 @@ def install(name=None, refresh=False, **kwargs): cached_pkg = pkginfo[version]['installer'] cached_pkg = cached_pkg.replace('/', '\\') cmd = '"' + str(cached_pkg) + '"' + str(pkginfo[version]['install_flags']) + if msiexec: + cmd = 'msiexec /i ' + cmd stderr = __salt__['cmd.run_all'](cmd).get('stderr', '') if stderr: log.error(stderr)