• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
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 the information @49Andy.


As the uninstall process was done and you are now facing a different error, please create a new topic to keep this one on this topic, for other users experiencing the same.

 

Please include What  exact error message you refer to as a Driver error or a connection error can indicate different issues, if you may include a screenshot it would be great.

 

Be sure to the me in the new post using the @ sign in the post, as well clarify if the printer is connected wirelessly or in any other connection...

 

Cheers,

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

You are a genius!!!! This worked after I got stuck on step 3 with "access denied". 

 

HP printer software now fully removed. Magic!

HP Recommended

You rock man

(by the way HP - you're site SUCKS - it should not take 5 minutes to sign in just to give this guys some props)

HP Recommended

Hi @ShlomiL,

I have the same issue, I think.  When I try to uninstall my printer, it tells me: 

Call to DriverPackageInstall returned error 5 for package 'C:\WiNDOWS\System32\DriverStore\FileRepository\(crazy looking gibberish filename).inf' A caller of DriverPackageInstall must be a member of the Administrators group to install a driver package.

 

I am an administrator on this computer if that's what it means.  My printer is an HP color laserjet pro mfp m281cdw.  Will this same solution work for me as well?

 

thank you for your help!

HP Recommended

Yes @LS367, it should likely help.


Generally, below Reply should help when you only have an HP printer:

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

 

If you may experience the issue on an HP computer, see below reply:

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

 

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

@inktech_P
Hi inktech_P,

Shlomil's solution worked for me. Perhaps, these instructions might clarify it for you...maybe you missed a step or two. I think maybe you should give it another try.

Start:
Righ-click on cmd then choose run as Administrator

Step#1; after typing the following command and pressing "enter", this command will give you OWNERSHIP of this directory and all of its sub-directories

takeown /f %windir%\System32\DriverStore\FileRepository /r /d y


Step#2; after typing the following command (substituting %username% with whatever name that's currently logged in (must have admin rights) and pressing "enter", this command will grant you full PERMISSIONS of this directory and all of its sub-directories
icacls "%windir%\System32\DriverStore\FileRepository" /grant %username%:(OI)(CI)F /T
then press enter

 

Step#3; after typing the following command and pressing "enter", this command will REMOVE this directory and all of its sub-directories that start with hp
for /d %G in ("%windir%\System32\DriverStore\FileRepository\hp*") do rd /s /q "%~G"
then press enter


Note Important:
Step#4 This is where I UNINSTALLED the drivers via Control Panel BEFORE the next step


After uninstalling the drivers via Control Panel (NO MORE ERRORS)
Step#5; after typing the following command and pressing "enter", this command will return OWNERSHIP back to the Administrators Group
takeown /f %windir%\System32\DriverStore\FileRepository /A /r /d y
then press enter


Conclusion: The HP drivers have been uninstalled.


If you're still having problems, maybe we can pinpoint the issue.
Let me know which step you're having problems with?
Let me know how it turns out.

HP Recommended

 ,

im so sorry for my bad engl im italian so...

, i have sawn that you solved the error 5 for the hp product ( yesterday i have done the windows 10 pro update and now those two hp products dosent work on lan connection) ,i have the same problem with my Officejet Pro 8600 and my Desingjet T520 i really will love you if you can help me with this problem becuse i saw that if the hp product  is different you need a diffirent command on the cmd to solve the problem becuse if i try with those codes (even running with administrator) my cmd told me for 4 process the command works fine but the last process tells me access denied (italian word for access denided is accesso negato as the cmd shows) .

 

Cattura.JPG

 

 

If you can help me to solve it you will be my hero too ❤️

 

 

HP Recommended

Hi, I have the same issue. When I was traying to delete my HP Ink Tank 315 basic software it appears driverpackageuninstall returned error 5 for package. I own a HP Pavilion Laptop 15-cw1xxx and the reason why I was triying to delete the printer's software is because it keeps printing the documents just for some parts of it and not complete. Also always appears: Misprint of the document and then continues traying to print the same document again.

 

It would be great if you could help me. I'll be waiting for your replay.

HP Recommended

Hi @Mangageom,

From reviewing Microsoft documentation for the Takeown command for Italian, it seems to me as the same prefix should be used for Italian too as much as I can understand, although I cannot be sure due to not being familiar with the Italian language.

 

Please review Microsoft's documentation below and see if any value may be used differently for the Italian locale when using the Takeown command:

https://docs.microsoft.com/it-it/windows-server/administration/windows-commands/takeown

 

May you see any difference when using a capital Y with the command as below command? it might be more crucial for the locale, but this is basically just a guess.

 

Spoiler
takeown /f %windir%\System32\DriverStore\FileRepository /r /d Y
icacls "%windir%\System32\DriverStore\FileRepository" /grant %username%:(OI)(CI)F /T
takeown /f %windir%\System32\DriverStore\FileRepository /A /r /d Y

Hope that helps,

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

@AlejoSoto wrote:

Hi, I have the same issue. When I was traying to delete my HP Ink Tank 315 basic software it appears driverpackageuninstall returned error 5 for package. I own a HP Pavilion Laptop 15-cw1xxx and the reason why I was triying to delete the printer's software is because it keeps printing the documents just for some parts of it and not complete. Also always appears: Misprint of the document and then continues traying to print the same document again.

 

It would be great if you could help me. I'll be waiting for your replay.


Prior to uninstalling the software, could you please print a Printer Status Report first @AlejoSoto?

I would not be surprised if the problem is not related to the software at all for my experience, can you see a Printer Status Report printed as the shown example or may you see any difference there?

https://support.hp.com/ph-en/product/hp-ink-tank-310-series/16180943/model/16180944/document/c056312...

 

Additionally, is the printer connected wirelessly or with a USB?

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 🙂
† 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>.