From 499513a5feabf648290096f749df918210d42f14 Mon Sep 17 00:00:00 2001 From: Dafydd Jones Date: Fri, 24 Dec 2021 17:07:12 +0000 Subject: [PATCH] salt-minion-py3: use registry install_dir for uninstaller where necessary --- salt-minion-py3.sls | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/salt-minion-py3.sls b/salt-minion-py3.sls index c5fde90f..49c78c9a 100644 --- a/salt-minion-py3.sls +++ b/salt-minion-py3.sls @@ -1,3 +1,5 @@ +{% set install_dir = salt["reg.read_value"]("HKLM", "SOFTWARE\\Salt Project\\Salt", "install_dir").vdata %} +{% set install_dir = install_dir or "C:\\salt" %} salt-minion-py3: {% for installer_version in [ @@ -16,7 +18,7 @@ salt-minion-py3: installer: 'https://repo.saltproject.io/windows/Salt-Minion-{{ installer_version }}-Py3-x86-Setup.exe' {% endif %} install_flags: '/S' - uninstaller: 'C:\salt\uninst.exe' + uninstaller: '{{ install_dir }}\uninst.exe' uninstall_flags: '/S' msiexec: False use_scheduler: True @@ -85,7 +87,7 @@ salt-minion-py3: '{{ version }}': skip_urltest: True full_name: 'Salt Minion {{ version }} (Python 3)' - uninstaller: 'C:\salt\uninst.exe' + uninstaller: '{{ install_dir }}\uninst.exe' uninstall_flags: '/S' use_scheduler: True {% endfor %}