Guidelines
We have new content about printers, Click here to check it out!
Check some of the most frequent questions about Instant Ink: HP INSTANT INK, HP+ PLANS: INK AND TONER.


Check out our WINDOWS 11 Support Center info about: OPTIMIZATION, KNOWN ISSUES, FAQs AND MORE.
HP Recommended

Thanks for clarifying @Hack7.

 

Please make sure you run CMD (Command Prompt) as Administrator and not skipping this step by any chance, this is very crucial.

If you get the same error, please let me know rather this is an HP computer, if you may have any other HP hardware or software than the printer or not, so I may guide you further accordingly.



Click the Yes button to reply that the response was helpful or to say thanks.
If my post resolve your problem please mark it as an Accepted Solution 🙂
HP Recommended

Let's try this again (it got removed last time)

 

I enabled the built-in Windows 10 Administrator account (use the Google) to find instructions.

Then I logged into the Administrator account, opened up file explorer and navigated to C:\Windows\System32\DriverStore\

I edited the permissions on the FileRepository folder (right click, properties, security tab, advanced, Change permissions) so that the Administrator account had Full Control

*making sure to tick the box to replace child object permissions

If any errors were thrown up, I made a note of the folder/file and edited those individually

*again, making sure to tick the box to replace child object permissions.
Then I  uninstalled the software, restarted the PC, logged in using my normal account and disabled the built-in Windows 10 Administrator account (use the Google) to find instructions.

*you could edit the permission on the folder again to remove the Administrator account from having Full Control but I didn't bother.

HP Recommended

Here's what i am doing:

1) Click search icon - lower left of screen

2) type "cmd" - pop up dialog box offers: 

  • Open
  • Run as administrator
  • Pin to Start
  • Pin to Task Bar

3) I click Run as administrator - a pop up titled "User Account Control" asks "Do you want to allow this app to make changes to your device?" and in the middle of the box it says "Windows Command Processor".

4) I click yes and the cmd prompt is ready and is at C:\WINDOWS\system32>

5) I then paste your 4 lines of code and it executes

6) when it is done running, Access denied for about 5 full pages

 

I am on an Acer, Win10 Home, Ver1909, OS Build 18363.720

to verify 

 

 

HP Recommended

Also I have 2 printers that I am trying to remove:

1) 4650

2) 6500

HP Recommended

Ok,

Let's try the following:

 

  1. Type CMD into the search bar, right-click and select Run as Administrator.
  2. Paste below command only and press Enter:
    Spoiler
    takeown /f %windir%\System32\DriverStore\FileRepository /A /r /d y
  3. Right-click the Start menu and select Run, paste the following and press OK:
    Spoiler
    %windir%\System32\DriverStore
  4. Right-click FileRepository and select Properties.
  5. Open the Security tab and press the Advanced button.
  6. Click Change, type your username in the shown box and press Check names, then press OK
  7. Check the box below - Replace owner on subcontainers and Objects and press OK.
  8. Click the Edit button.
  9. Click Add, type your username and press Check Names, then press OK
  10. Select Full Control for Allow and press OK twice.
  11. Type CMD into the search bar, right-click and select Run as Administrator.
  12. Paste below commands and press Enter:
    Spoiler
    for /d %G in ("%windir%\System32\DriverStore\FileRepository\hpwia*") do rd /s /q "%~G"
    takeown /f %windir%\System32\DriverStore\FileRepository /A /r /d y
  13. Now try uninstalling the HP Basic Device Software for both printers and check for any difference.

Please let me know the results,

Shlomi



Click the Yes button to reply that the response was helpful or to say thanks.
If my post resolve your problem please mark it as an Accepted Solution 🙂
HP Recommended

...

4. Right-click FileRepository and select Properties.

5. Open the Security tab and press the Advanced button.

6. Click Change, type your username in the shown box and press Check names, then press OK

7. Check the box below - Replace owner on subcontainers and Objects and press OK.

8. Click the Edit button.

everything went fine until this step. The "add" button is grayed out. There are four Groups or user names, "Everyone, ALL APPLICATION PACKAGES, ALL RESTRICTED APPLICATION PACKAGES, SYSTEM". For each one the "Add" button is gray.

HP Recommended

Thanks,

This may happen due to a corrupted user profile, preventing getting the required permissions for the user.

 

Could you please add a screenshot of the dialog once opening the Security tab and pressing the Advanced button?  (Advanced Security Settings for FileRepository)

To see if it may give any clue for any possible cause.



Click the Yes button to reply that the response was helpful or to say thanks.
If my post resolve your problem please mark it as an Accepted Solution 🙂
HP Recommended

Hack7_0-1586984486720.png

 

HP Recommended

Hi @Hack7,

thanks for the feedback, but please try @louca001 suggestions first and see if that help getting the required permissions, it seems as we both missed his comments due the high thread activity:

https://h30434.www3.hp.com/t5/Printer-Software-and-Drivers/driverpackageuninstall-returned-error-5-f...

May that help?



Click the Yes button to reply that the response was helpful or to say thanks.
If my post resolve your problem please mark it as an Accepted Solution 🙂
HP Recommended

OK files successfully deleted. I followed @louca001 directions mostly.

The change permissions did not work for me so I changed ownership and then was able to delete the files. Then changed ownership back and seems I'm good to go.

Thank you and big thanks to @louca001 !!!

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.