ScoopInstaller / Scoop

A command-line installer for Windows.

Home Page:https://scoop.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] msiexec.exe calls fail if scoop is installed in a path that contains a space

omer54463 opened this issue · comments

Bug Report

Current Behavior

When triggering msiexec.exe (for instance, when upgrading Python), an .msi file is downloaded and run by msiexec.exe, with the parameters not surrounded with parenthesis.

This fails if any of the parameters contain a space. In my case:

"msiexec.exe" /a C:\Users\Omer Lubin\scoop\apps\python\3.12.3\_tmp\AttachedContainer\core.msi /qn TARGETDIR=C:\Users\Omer Lubin\scoop\apps\python\3.12.3\SourceDir /lwe C:\Users\Omer Lubin\scoop\apps\python\3.12.3\_tmp\AttachedContainer\msi.log

This fails, obviously, because there could be spaces in the path!

Expected Behavior

Scoop should support paths containing spaces, including during MSI installation.

Possible Solution

Probably just transform the call into something like this:

msiexec.exe /a "C:\Users\Omer Lubin\scoop\apps\python\3.12.3\_tmp\AttachedContainer\core.msi" /qn "TARGETDIR=`"C:\Users\Omer Lubin\scoop\apps\python\3.12.3\SourceDir`"" /lwe "C:\Users\Omer Lubin\scoop\apps\python\3.12.3\_tmp\AttachedContainer\msi.log"

Notice the escaping of the " for the TARGETDIR value (I used powershell, so the tilde is an escape).

System details

Windows version: Windows 11 23H2 build 22631.3447

OS architecture: 64bit

PowerShell version: 5.1.22621.2506

Scoop Configuration

{
    "last_update":  "2024-04-19T21:59:46.4598889+03:00",
    "scoop_branch":  "master",
    "scoop_repo":  "https://github.com/ScoopInstaller/Scoop"
}