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

Used to be able to launch VSCode from an Administrator Cmd Prompt but recently cannot? #170577

Closed
Jezhan opened this issue Jan 4, 2023 · 6 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) workbench-run-as-admin Issues concerning running as administrator

Comments

@Jezhan
Copy link

Jezhan commented Jan 4, 2023

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.75.0
  • OS Version: Windows 11

Steps to Reproduce:

  1. Download/install Visual studio code or Visual studio code insider
  2. Launch admin cmd prompt
  3. run "code-insiders . "

Observe this:
image

@ayrtonmassey
Copy link

Also experiencing this issue after updating today.

  • VS Code Version: 1.74.2
  • Commit: e8a3071
  • OS Version: Windows 11 Enterprise 21H2
  • OS Build: 22000.1335

Previously, I was able to open VS Code from an Administrator PowerShell without issue. After updating I see this error when I try to run VS Code as Administrator, whether from PowerShell or via the right-click menu of the start menu item:

image

I have tried closing all instances of VS Code, rebooting the machine, checking for VS Code updates but nothing has fixed the issue. VS Code runs fine if started as non-admin from the start menu.

@joaomoreno joaomoreno assigned bpasero and unassigned joaomoreno Jan 6, 2023
@bpasero bpasero added the workbench-run-as-admin Issues concerning running as administrator label Jan 6, 2023
@bpasero
Copy link
Member

bpasero commented Jan 6, 2023

/duplicate #122951

@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 6, 2023
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2023
@ayrtonmassey
Copy link

@bpasero I don't think this is a duplicate of the AppLocker issue. I was able to open VSCode as administrator as recently as yesterday morning (before updating). It is only with the latest update that it fails to open. Is there a way I can check whether AppLocker is the source of the issue?

@bpasero
Copy link
Member

bpasero commented Jan 6, 2023

This was a recent change. The link was not working correctly, see https://github.com/microsoft/vscode-docs/blob/vnext/docs/setup/windows.md#unable-to-run-as-admin-when-applocker-is-enabled now

@ayrtonmassey
Copy link

@bpasero the workaround resolved the issue for me. Thanks for the doc link!

@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) workbench-run-as-admin Issues concerning running as administrator
Projects
None yet
Development

No branches or pull requests

5 participants