Error 0x5: You must run this command from a command prompt with administrator privilege.

PeFaK

Reputable
Jul 8, 2015
5
0
4,510
Zy7dKx2.png


Hello, kind community,

I'ce been having this problem. As you can see on the above image, I was trying to generate a wlan report in some default location (at least that's what I'm expecting from this command). But for some reason, even after running the cmd prompt as admin (also my account type is set to administrator, and UAC is disabled) it tells me, I have no admin privileges.

It maybe is worth noting, that I have the latest (as far as I know) Fall Creator Update.
 
Solution
try running chkdsk c: /f

you can try this but I don't know if it will help
right click start button
choose powershell (admin)
type SFC /scannow and press enter
once its completed, copy/paste this command into same window:
Repair-WindowsImage -Online -RestoreHealth and press enter
SFC fixes system files, second command cleans image files, re run SFC if it failed to fix all files and restart PC
try running chkdsk c: /f

you can try this but I don't know if it will help
right click start button
choose powershell (admin)
type SFC /scannow and press enter
once its completed, copy/paste this command into same window:
Repair-WindowsImage -Online -RestoreHealth and press enter
SFC fixes system files, second command cleans image files, re run SFC if it failed to fix all files and restart PC
 
Solution
Y3DjswX.png


I failed to mention, that before I ran the sfc scan and it fixed some things, thus maybe it changed to error 0x2.

Then I ran chkdsk as you suggested, then ran the SFC scan again and after, the cmd generated the wlan report. Also didn't have to run Repair-Win...

Sooo, thank you.