-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Printers
- Printer Setup, Software & Drivers
- Re: driverpackageuninstall returned error 5 for package I h...

Create an account on the HP Community to personalize your profile and ask a question
04-15-2020 11:31 AM
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 🙂
04-15-2020 11:44 AM - edited 04-15-2020 11:45 AM
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.
04-15-2020 12:37 PM
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
04-15-2020 12:50 PM - edited 05-14-2020 11:34 AM
Ok,
Let's try the following:
- Type CMD into the search bar, right-click and select Run as Administrator.
- Paste below command only and press Enter:Spoiler
takeown /f %windir%\System32\DriverStore\FileRepository /A /r /d y
- Right-click the Start menu and select Run, paste the following and press OK:Spoiler%windir%\System32\DriverStore
- Right-click FileRepository and select Properties.
- Open the Security tab and press the Advanced button.
- Click Change, type your username in the shown box and press Check names, then press OK
- Check the box below - Replace owner on subcontainers and Objects and press OK.
- Click the Edit button.
- Click Add, type your username and press Check Names, then press OK
- Select Full Control for Allow and press OK twice.
- Type CMD into the search bar, right-click and select Run as Administrator.
- 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
- 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 🙂
04-15-2020 02:28 PM
...
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.
04-15-2020 02:35 PM
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 🙂
04-15-2020 11:08 PM
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:
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 🙂
04-17-2020 04:24 PM
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 !!!