Skip to content
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

Windows: MSI installer only adds neovim to PATH for the current user (regression in 0.9.0+) #27551

Closed
jantari opened this issue Feb 20, 2024 · 3 comments · Fixed by #29099
Closed
Labels
bug issues reporting wrong behavior distribution packaging and distributing Nvim to users platform:windows
Milestone

Comments

@jantari
Copy link

jantari commented Feb 20, 2024

Problem

When installing neovim on Windows using t he MSI setup, versions 0.9.0 and newer only ever add the neovim program directory to the PATH environment variable of the current user who is running the installer, not everyone.

This leads to neovim (nvim command) not being available to any user on the computer except one.

This appears to be a regression from the following PR: #22856
which was soon after partially, but not fully, reverted in 95fe166

The problem is that the "System" attribute in the WiX "Environment" block remains changed to "no":

    <CPackWiXFragment Id="CM_CP_bin.nvim.exe">
      <Environment
        Id='UpdatePath'
        Name='PATH'
        Action='set'
        Permanent='no'
-       System='yes'
+       System='no'
        Part='last'
        Value='[INSTALL_ROOT]bin'
      />
    </CPackWiXFragment>

WiX Docs v3: https://wixtoolset.org/docs/v3/xsd/wix/environment/
WiX Docs v4: https://wixtoolset.org/docs/schema/wxs/environment/#attributes

System (YesNoTypeUnion]):
Specifies that the environment variable should be added to the system environment space. The default is 'no' which indicates the environment variable is added to the user environment space.

Installing neovim 0.8.3 using the MSI installer, everything works as expected

Steps to reproduce

curl.exe -L "https://github.com/neovim/neovim/releases/download/v0.9.5/nvim-win64.msi" -o "nvim095-win64.msi"
cmd.exe /D /C start "" /WAIT /B msiexec.exe /i "nvim095-win64.msi" /qn ALLUSERS=1

powershell.exe -noprofile -c "[environment]::GetEnvironmentVariable('PATH', 'machine') -split ';'"
powershell.exe -noprofile -c "[environment]::GetEnvironmentVariable('PATH', 'user') -split ';'"

Expected behavior

Neovim / the nvim command should be available to all users after Neovim has been installed, like it was before v0.9.0.

Neovim version (nvim -v)

NVIM v0.9.5

Vim (not Nvim) behaves the same?

Operating system/version

Windows Server 2022 Build 10.0.20348.2322

Terminal name/version

Microsoft Conhost 10.0.20348.2322

$TERM environment variable

Installation

MSI

@jantari jantari added the bug issues reporting wrong behavior label Feb 20, 2024
@clason clason added platform:windows distribution packaging and distributing Nvim to users labels Feb 20, 2024
@justinmk
Copy link
Member

@ateoi

@justinmk justinmk added this to the backlog milestone Feb 20, 2024
@dundargoc dundargoc moved this from Enhanchements to Bugs in CI, Build and Automation Mar 31, 2024
@TheLeoP
Copy link
Contributor

TheLeoP commented May 30, 2024

Has a decision been made about this? The current configuration installs Neovim per-machine (all users) but only adds it to the Path per-user (single user). So, changing the setting back to System='yes' seems like the right decision to me.

The previous problem regarding privileges when upgrading versions (#22933) come from the fact that users were upgrading across installations context, which isn't supported or recommended

@justinmk
Copy link
Member

PR welcome.

The previous problem regarding privileges when upgrading versions (#22933) come from the fact that users were upgrading across installations context, which isn't supported or recommended

That info and references will be helpful if this is raised again in the future. So please include it in the commit message :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior distribution packaging and distributing Nvim to users platform:windows
Projects
Development

Successfully merging a pull request may close this issue.

5 participants