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: install has insufficient privileges after admin password #22933

Closed
DeadRobotDev opened this issue Apr 7, 2023 · 10 comments · Fixed by #22949
Closed

Windows: install has insufficient privileges after admin password #22933

DeadRobotDev opened this issue Apr 7, 2023 · 10 comments · Fixed by #22949
Labels
bug issues reporting wrong behavior distribution packaging and distributing Nvim to users platform:windows

Comments

@DeadRobotDev
Copy link

Problem

Tried to update to the latest rebuild from an old nightly. It failed, stating it had insufficient privileges to access cat.exe, I think.

Uninstalled the previous version in case that was an issue. Still fails to install, stating it has insufficient privileges to access C:\Program Files\Neovim.

I believe it is related to the UAC prompt. In the nightly build, it mentionsnvim-win64.msi in the UAC prompt. In the release build, it mentions C:\Windows\Installer\3a5b0f68.msi. And not always the same string.

Steps to reproduce

  1. Run nvim-win64.msi on a non-admin account.
  2. Install to default location, C:\Program Files\Neovim.
  3. At "Removing applications", it asks for admin privileges for C:\Windows\Installer\3a5b0f68.msi. Enter the password.
  4. At "Copying new files", it says it has insufficient privileges to access the directory.

msiexec_xNPJFCXKvN

Expected behavior

I enter the password for admin privileges, and it installs correctly to C:\Program Files\Neovim.

It worked on NVIM v0.9.0-dev-1166+g06aed7c17, which is the last nightly I installed before the release build.

Neovim version (nvim -v)

0.9.0

Vim (not Nvim) behaves the same?

NA

Operating system/version

Windows 10 Home 19045.2728

Terminal name/version

alacritty 0.12.0 (5a728195)

$TERM environment variable

xterm-256color

Installation

Repo .msi

@DeadRobotDev DeadRobotDev added the bug issues reporting wrong behavior label Apr 7, 2023
@DeadRobotDev DeadRobotDev changed the title Windows 10: install has insufficient privileges after admin password Windows: install has insufficient privileges after admin password Apr 7, 2023
@dundargoc
Copy link
Member

May be caused by #22856

@zeertzjq zeertzjq added platform:windows distribution packaging and distributing Nvim to users labels Apr 8, 2023
@rollingmoai
Copy link

rollingmoai commented Apr 8, 2023

There should be an option in the installer to install per-user or per-machine, like this:
image

Maybe we can revert this part for a while?

<!-- Allow installation by non-administrative users -->
<!-- https://learn.microsoft.com/windows/win32/msi/allusers -->
<CPackWiXFragment Id="#PRODUCT">
<Property Id="ALLUSERS" Value="2" />
<Property Id="MSIINSTALLPERUSER" Value="1" />
</CPackWiXFragment>

dundargoc pushed a commit that referenced this issue Apr 8, 2023
Revert this change until a proper solution is implemented, such as allowing the
user to select whether to install per-user or per-machine.

Fixes #22933.
dundargoc pushed a commit to neodundar/neovim that referenced this issue Apr 8, 2023
Revert this change until a proper solution is implemented, such as allowing the
user to select whether to install per-user or per-machine.

Fixes neovim#22933.
@RomanoZumbe
Copy link

I just tried to update nvim on a windows machine and encounter this issue with the current release version
image

@winter-again
Copy link

I'm having the same issue.

@dundargoc
Copy link
Member

Does uninstalling and then installing work?

@winter-again
Copy link

Does uninstalling and then installing work?

Thanks, this worked for me. Looks like the install location changed, correct? Is this something to look out for when updating via .msi in the future?

@RomanoZumbe
Copy link

Does uninstalling and then installing work?

It did work. Thanks!

@dundargoc
Copy link
Member

Thanks, this worked for me. Looks like the install location changed, correct? Is this something to look out for when updating via .msi in the future?

Not intentionally, no.

@kepplingerstephan
Copy link

Had same issue while updating on windows
image
after deinstalling old version, installer worked

@ikopysov
Copy link

Had the same issue, but there was no option to remove previous version - I was not able to find it under "Add or remove programs" menu.
Also there was no option to run it as admin user.
Compatibility settings also not available (all of them disabled).

Was able to install it using sudo ii ".\nvim.msi" in pwsh using sudo from https://github.com/lukesampson/psutils

Hope it will help someone.

folke pushed a commit to folke/neovim that referenced this issue May 22, 2023
Revert this change until a proper solution is implemented, such as allowing the
user to select whether to install per-user or per-machine.

Fixes neovim#22933.
TheLeoP added a commit to TheLeoP/neovim that referenced this issue May 30, 2024
details:
 neovim#22856 made possible for the msi installer to perform per-user
 installations. This caused problems when users that already had
 per-machine installations tried to update neovim#22933 (the Windows Installer
 does not support major upgrades across installation context, see
 https://stackoverflow.com/a/15498911). This was then reverted on
 neovim#22949, but the scope of the modification to the PATH environment
 variable was not reverted.
zeertzjq pushed a commit that referenced this issue May 31, 2024
#22856 made it possible for the msi installer to perform per-user
installations, which caused problems for users that already had
per-machine installations trying to update (the Windows Installer does
not support major upgrades across installation context, see #22933 and
https://stackoverflow.com/a/15498911). It was then reverted in #22949,
but the scope of the modification to the PATH environment variable was
not reverted.
github-actions bot pushed a commit that referenced this issue May 31, 2024
#22856 made it possible for the msi installer to perform per-user
installations, which caused problems for users that already had
per-machine installations trying to update (the Windows Installer does
not support major upgrades across installation context, see #22933 and
https://stackoverflow.com/a/15498911). It was then reverted in #22949,
but the scope of the modification to the PATH environment variable was
not reverted.

(cherry picked from commit a18652e)
huangyingw pushed a commit to huangyingw/neovim that referenced this issue May 31, 2024
…29099)

neovim#22856 made it possible for the msi installer to perform per-user
installations, which caused problems for users that already had
per-machine installations trying to update (the Windows Installer does
not support major upgrades across installation context, see neovim#22933 and
https://stackoverflow.com/a/15498911). It was then reverted in neovim#22949,
but the scope of the modification to the PATH environment variable was
not reverted.
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
None yet
Development

Successfully merging a pull request may close this issue.

8 participants