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

Vim Package - Not added to path #656

Closed
nmat opened this issue May 21, 2020 · 15 comments
Closed

Vim Package - Not added to path #656

nmat opened this issue May 21, 2020 · 15 comments
Labels
Area-External Help-Wanted This is a good candidate work item from the community. Installer-Issue Issue with the package's installer. Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@nmat
Copy link

nmat commented May 21, 2020

Description of the new feature/enhancement

Installed vim and tried to start gvim and vim from powershell but the path is not added correctly. Using package from website and telling package to use full install would it to path.

Proposed technical implementation details (optional)

Ability to add to path in some way.

@nmat nmat added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label May 21, 2020
@denelon
Copy link
Contributor

denelon commented Jan 6, 2021

This appears to be related either to the installer or switches that should be added to the manifest. Is this problem still occuring?

@ghost ghost added the No-Recent-Activity No activity has occurred on this work item for seven days. label Jan 13, 2021
@ghost
Copy link

ghost commented Jan 13, 2021

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

@ghost ghost closed this as completed Jan 20, 2021
@rylev
Copy link

rylev commented Jan 29, 2021

FYI: This problem is still occurring - I can reproduce this with the latest version of winget.

@ghost ghost removed the No-Recent-Activity No activity has occurred on this work item for seven days. label Jan 29, 2021
@okmanideep
Copy link

Same for Neovim.Neovim as well

@denelon denelon reopened this May 24, 2022
@denelon denelon added Area-External Issue-Bug It either shouldn't be doing this or needs an investigation. Help-Wanted This is a good candidate work item from the community. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels May 24, 2022
@denelon
Copy link
Contributor

denelon commented Jun 9, 2022

Vim's installer for Windows appears to be Nullsoft. I would suggest making an Issue and if you have the time and skill, a contribution to have the path added by the installer.

@denelon
Copy link
Contributor

denelon commented Jun 9, 2022

Neovim's installer for Windows appears to be Wix. I would suggest making an Issue and if you have the time and skill, a contribution to have the path added by the installer.

@denelon denelon added the Installer-Issue Issue with the package's installer. label Jun 9, 2022
@metalglove
Copy link

I have stumbled upon this issue as well.
I have resolved it using this PowerShell script.

winget install -e --id vim.vim -v 9.0.0009
[Environment]::SetEnvironmentVariable('Path', $env:PATH + ';C:\Program Files\Vim\vim90\',  'User')

@sitiom
Copy link
Contributor

sitiom commented Jul 24, 2022

Same for Neovim.Neovim as well

It works for me when I run it in the terminal, but it doesn't work open running it from "Run" (Win + R) due to an excess slash in the path. This should be fixed in neovim/neovim#19485.

@denelon
Copy link
Contributor

denelon commented Oct 14, 2022

Has the path issue with the Vim installer been resolved?

@alexchro93
Copy link
Member

@denelon installing the package interactively allows you to configure gvim/vim so that it can be invoked from the command line, assuming C:\Windows is in your path (which I think it is by default).

Running:

winget install --id vim.vim --interactive

Leads to:

image

@denelon
Copy link
Contributor

denelon commented Oct 19, 2022

@alexchro93 unfortunately, nobody has been able to share switches that work for this in "silent" or "silent with progress" install mode. Thanks for the update though! I'm trying to loop through some of the older issues to see if we can get some traction. I think this is likely to require changes for the Vim installer to be able to work in the default install mode with WinGet.

@AsciiWolf
Copy link
Contributor

Still the same issue.

@yrro
Copy link
Contributor

yrro commented Aug 7, 2023

I have stumbled upon this issue as well. I have resolved it using this PowerShell script.

winget install -e --id vim.vim -v 9.0.0009
[Environment]::SetEnvironmentVariable('Path', $env:PATH + ';C:\Program Files\Vim\vim90\',  'User')

Don't do this! It's a really common way for poorly written installers to screw up a system in a really subtle way that will cause breakage that may only be discovered months or years down the line.

You will permanently expand all environment variable references within HKCU\Environment's PATH value, and change the type from REG_EXPAND_SZ to REG_SZ.

This is a serious bug in .NET that at this point I am assuming will never be fixed.

Instead you should retrieve the data for the value you wish to change:

(Get-Item HKCU:\Environment).getValue("PATH", $null, "DoNotExpandEnvironmentNames")

... then manipulate the data. There are two ways to safely update the PATH value's data:

  1. Use Set-ItemProperty HKCU:\Environment PATH $newPath -Type ExpandString
  2. Call this overload of RegistryKey.setValue

Copy link
Contributor

Hello @nmat,

This issue has been identified as requiring a fix from a third party or external repository. Since there has been no recent activity on this issue, it will be automatically closed.

Template: msftbot/noRecentActivity/areaExternal

1 similar comment
Copy link
Contributor

Hello @nmat,

This issue has been identified as requiring a fix from a third party or external repository. Since there has been no recent activity on this issue, it will be automatically closed.

Template: msftbot/noRecentActivity/areaExternal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-External Help-Wanted This is a good candidate work item from the community. Installer-Issue Issue with the package's installer. Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

9 participants