Skip to content

[Bug]: win_pkg regression since v3006.17 involving quoting command arguments and paths #68950

@dafyddj

Description

@dafyddj

What happened?

A regression has become apparent in Salt versions from v3006.17 to v3006.23.

Winrepo package definitions that have msiexec: true that used to work no longer work.
Msiexec can't recognise certain command arguments/properties and so hangs on the help dialog box.

A minimal example of a state that works before v3006.17 and fails afterwards is:

test:
  pkg.installed:
    - name: nsclient
    - extra_install_flags: MYPROPERTY="C:\some file.txt"

Inspection with Process Explorer shows that the actual called command is:

msiexec /I "C:\ProgramData\Salt Project\Salt\var\cache\salt\minion\extrn_files\base\github.com\mickem\nscp\releases\download\0.11.29\NSCP-0.11.29-x64.msi" ALLUSERS=1 /qn /norestart "MYPROPERTY=C:\some file.txt"

and the argument "MYPROPERTY=C:\some file.txt" causes msiexec to fail, whereas in working Salt versions the argument is correctly specified:

"msiexec" /I "C:\ProgramData\Salt Project\Salt\var\cache\salt\minion\extrn_files\base\github.com\mickem\nscp\releases\download\0.11.29\NSCP-0.11.29-x64.msi" ALLUSERS=1 /qn /norestart MYPROPERTY="C:\some file.txt"

The regression was likely introduced in #68448 or related PRs

FAO @twangboy

Type of salt install

Official exe

Major version

3006.x

What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)

windows-desktop-11

salt --versions-report output

Salt Version:
          Salt: 3006.23

Python Version:
        Python: 3.10.19 (heads/main:cdd8334, Feb 17 2026, 23:40:07) [MSC v.1944 64 bit (AMD64)]

Dependency Versions:
          cffi: 2.0.0
      cherrypy: unknown
  cryptography: 46.0.5
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: 4.0.7
     gitpython: 3.1.41
        Jinja2: 3.1.6
       libgit2: Not Installed
  looseversion: 1.0.2
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 24.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: Not Installed
  python-gnupg: 0.4.8
        PyYAML: 6.0.1
         PyZMQ: 25.0.2
        relenv: 0.22.4
         smmap: 4.0.0
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist:
        locale: utf-8
       machine: AMD64
       release: 10
        system: Windows
       version: 10 10.0.26100 SP0 Multiprocessor Free

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbroken, incorrect, or confusing behaviorneeds-triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions