sublime_text icon indicating copy to clipboard operation
sublime_text copied to clipboard

"Unable to run with elevated privileges" when updating Windows version

Open nriley opened this issue 4 years ago • 10 comments

Description

I am not an administrator on my work Windows 10 machine. I have installed Sublime Text in my user profile directory on a local disk. The auto-updater prompts for administrative credentials which I do not have and fails when I cannot provide them, despite the filesystem permissions not requiring it.

Steps to reproduce

  1. Install (an old version of) Sublime Text 4.
  2. "Check for updates" and install the update.

Expected behavior

The installed version of Sublime Text updates.

Actual behavior

A UAC prompt, which when I cancel, gives me:

image

Moving the contents of Data\Update over the top of my installation to update manually from Windows Explorer works fine, without prompting for elevation.

Environment

  • Build: 4095
  • Operating system and version: Windows 10

nriley avatar Jan 31 '21 20:01 nriley

Most likely this is the installer trying to set up registry keys for file associations. Previously we didn't do that.

I'll have to look and see if there is a way for us to get the installer to allow choosing between setting up associations at the machine level, or user level.

In the mean time, using the portable install may be a better fit, since that doesn't touch your registry at all and keeps everything in your install dir.

wbond avatar Feb 01 '21 15:02 wbond

Hmm, thought I was using the portable install. But it'd be nice if file associations worked too!

nriley avatar Feb 01 '21 15:02 nriley

It is possible I've interpreted this wrong. I'll have to see if I can reproduce.

wbond avatar Feb 01 '21 16:02 wbond

Thanks. Let me know if I can provide any additional info to help (is there a way to tell if I have the portable install)?

nriley avatar Feb 01 '21 17:02 nriley

The upgrade to build 4097 worked perfectly without any UAC prompting. Did this get fixed?

nriley avatar Feb 04 '21 00:02 nriley

We didn't change anything on our end. I'm inclined to close and have you re-open if you run into this again.

wbond avatar Feb 04 '21 06:02 wbond

Sounds good. This did happen with many upgrades before I reported it so either something changed on my end of which I am unaware or I just got lucky with a race condition.

nriley avatar Feb 04 '21 09:02 nriley

This has happened with the last couple versions. This time I expanded the UAC prompt - it looks like it's trying to run the updater with --admin despite it being within my user profile directory. Writing to any of those directories should not require elevation.

image

nriley avatar Mar 29 '21 22:03 nriley

Was there ever any resolution to this?

capn-freako avatar May 06 '24 12:05 capn-freako

I still get it from time to time and have to manually download/replace Sublime Text rather than use the updater.

nriley avatar May 06 '24 13:05 nriley