HP shitty error

Eroare

„Cal to DriverPackage Uninstall returned error 5 for package
C:\Windows\System32\DriverStore\FileRepository\hpwia_oj5740.inf_amd64_ad1248a34e6ae 108\oj5740.inf
A caller of DriverPackageInstall must be a member of the Administrators group to install a driver package.”

 

  • run command prompt as administrator
  • one time paste:
takeown /f %windir%\System32\DriverStore\FileRepository /r /d y
icacls "%windir%\System32\DriverStore\FileRepository" /grant %username%:(OI)(CI)F /T
for /d %G in ("%windir%\System32\DriverStore\FileRepository\hpwia*") do rd /s /q "%~G"
takeown /f %windir%\System32\DriverStore\FileRepository /A /r /d y