-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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: Prevent update service from activating if running as Admin in User install #148428
Comments
Perhaps the update should not be run if there are any other Code instances are open. |
That won't happen anyway unless they aren't sharing the same user data dir. Have you observed otherwise? |
Added this on 147763, but probably should have put it here.
@joaomoreno: Just thought I should mention that running VS Code as admin is what enabled my VS Code to actually update in a user setup. #147408 (comment) |
Yeah I'm aware of that. Is also theoretically what put you in that situation. Is it possible you ran Code like that prior to the bug happening? I'm currently investigating. |
If you mean, ran as admin once and it updated while that instance was running, then, yes, that's possible. I never had the error on the linked issue happen before my winget switch, though, thus my suspicion there. On the other hand, where VS Code updates only happen once a month, it could just be that one-off runs as admin never coincided with an update. On the first hand, though, I have this problem on two machines now, since that switch, and it seems unlikely that I would have run as admin at the same time as the monthly update on two machines where I never had before. 🤷 |
Please, do not implement this. It's going to break the only way there is to update User installations. #155043 |
I'm running into this on a third machine that I know absolutely never runs Code as admin. (It is still installed as admin, but never run as admin.) |
Possible code pointer for where to prevent update service from activating on Windows if running as Admin in User install? #155547 (comment) |
Verification:
|
@joaomoreno this verifies on today's Insiders if no other instances of Code are running when I run as admin. But if I already have a normally-launched instance, the main log of a subsequent admin-launched instance doesn't report that message. Is this correct? |
That's OK. The main process runs always using the permissions of the first launch. And the update service always runs on the main process. Thanks for verifying! |
This solution doesn't work for me, I need to be running vscode elevated and always have been, same for my team members. I don't remember why, but after some days/weeks running vscode normally I always get reminded of why it was needed. Could a solution be to prevent the update service only when vscode has a normal instance AND an elevated instance running at the same time? I believe this would make everyone happy. 🥳 |
From #147763 (comment)
The text was updated successfully, but these errors were encountered: