Get root access on windows 10

Gireg de Kerdanet 21 Reputation points
2021-12-06T23:22:04.337+00:00

Hello,

I am a developer and I'm am very annoyed to not have root access on my windows 10 PC.

Why I need it :
Today, while developping a UWP app, Visual Studio managed to create a duplicate copy of my app in C:\Program Files\WindowsApps. I could no longer deploy my app for debug. It did not appear in the start menu so it could no be uninstalled. I could not remove the duplicate app in this folder in command line even with Remove-AppxPackage. I was stuck. I only managed to fix it by forcing reinstallation from the store.
For your information, I also develop on MacOS and I can tell you my developping experience is a million times better on MacOS than on Windows. I always run into impossible problems when I code on windows. You really need to do something... That's it for the feedback.

So is there any way to get this root access ?

  • I have tried to run 'net user administrator /active:yes' in admin powershell but I get an unknown username error
  • I have tried to open lusrmgr.msc but nothing can be done with it

I am on Windows 10 19041.1348
According to the forums, this used to be possible.

Windows for business Windows Client for IT Pros Devices and deployment Configure application groups
0 comments No comments
{count} votes

Accepted answer
  1. MotoX80 36,291 Reputation points
    2021-12-07T00:35:57.507+00:00

    From the command prompt run this. Do you know the password for any of the accounts in the Administrators group? Does your account show up?

    net localgroup administrators  
    whoami  
    

    I have tried to run 'net user administrator /active:yes' in admin powershell

    If you were able to launch Powershell with "run as administrator", then you already have admin rights, By "root" do you really mean the SYSTEM account?

    Update: From looking at the permissions on that folder, it would appear that you want to be "system". You can get a command prompt as that with PSExec.

    https://learn.microsoft.com/en-us/sysinternals/downloads/psexec

    psexec \\localhost -s cmd.exe  
    whoami  
    exit  
    

    Be careful using that.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Gireg de Kerdanet 21 Reputation points
    2021-12-07T08:47:05.43+00:00

    Hello MotoX80,

    Thank you very much for your answer.
    Yes I mean to have System access.

    • unfortunately, "net localgroup administrators" returns a system error 1376, the local group does not exists.
      • I've downloaded psexec and launched the command you suggested as administrator and it worked :) Thank you !!

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.