Fix: Network Printer Won’t Install (Error 0x00000006 / “The Handle is Invalid”)

Case: HP Deskjet 2520hc, shared from a PC/server, client on Windows 10 x64.

Root Cause

If you connect to a network printer by opening Explorer → typing \\server-name → double-clicking the printer, Windows auto-installs a driver for you — and it often ends up with a mismatched/generic minidriver running on top of Windows’ built-in Unidrv printing architecture (you can check this under C:\Windows\System32\spool\drivers\x64\3), instead of the vendor’s actual tuned driver package. That mismatch is what triggers:

  • Operation failed with error 0x00000006
  • Unable to install printer. The handle is invalid

(Note: Unidrv itself is a legitimate Microsoft component that many real HP drivers are built on too — it’s the wrong minidriver getting auto-assigned that causes the failure, not Unidrv being broken.)

Full Cleanup First (Recommended)

Before reinstalling manually, wipe out any leftover trace of the botched auto-install — otherwise you’ll keep hitting stale ports/drivers:

  1. Print Management (printmanagement.msc, under Administrative Tools) → Print Servers → [your PC] → Drivers → find the printer’s driver → delete it. Check Ports too and remove any stale \\server-name\printer-name entries.
  2. Devices and Printers → right-click the printer → Remove device.
  3. Add or Remove Programs (Apps & Features) → uninstall any HP software package tied to this printer, if one got installed.
  4. Stop the Print Spooler service (services.msc) → clear out C:\Windows\System32\spool\drivers\x64\3 (and \4 if present) and C:\Windows\System32\spool\PRINTERS → start the Print Spooler service again.

A reboot after this is a good idea before moving on.

The Fix

Skip the Explorer auto-install. Install manually via Add Printer instead:

  1. Add PrinterAdd a local printer (not “network printer”).
  2. Create a new port → type Local Port → enter \\server-name\printer-name.
    • If you get “port already exists” → pick Use an existing port and select the same port from the dropdown instead of creating a new one.
  3. Download the official driver from HP (the Basic Driver package, not the Full Feature Software) → extract it using winrar/winzip (don’t run the installer directly).
  4. In the wizard, click Have Disk → browse to the entire extracted folder (the .inf needs its companion DLL/CAT files sitting in the same folder).
  5. Pick the printer model that shows up from that inf file → finish the wizard.

Moving the boot partition of Windows 7 to another drive

Sometimes when you install Windows 7 with more than 1 drive connected,
the System partition and System Reserved partition that contains boot files are put into different drives
this makes you unable to boot without both your drive connected.

To fix it :

  1. Mark the system partition as active in disk management
  2. Insert installation disc (to be used later)
  3. Power down system
  4. Disconnect any other drive except the one that contains system partition
  5. Turn power on
  6. Boot to the installation disc
  7. Use startup repair (it may take up to 3 times with a restart for each until it’s fixed)
  8. After doing this procedure, the System Reserved partition that’s in another drive can be safely deleted.

Notes : System reserved partition is not needed for Windows at all.
As long as you have the Windows installation disc and the boot files in your system partition, you should be fine.
For some laptops, using the usb 3 port for the installation flashdrive/dvd makes the MBR/boot loader fixing process to fails,
so make sure to use the standard usb port whenever possible.

Block any websites except the specified ones in Mikrotik

For this example we’re blocking everyhing except gmail and google, gstatic is for the images and icons in gmail

Make these two L7 Protocols :

  1. Name : allow
    Regexp : ^.+(gmail|google|gstatic).*$
  2. Name : block
    Regexp : ^.*$

Make these four firewall filters, make sure they’re in this order :

  1. Chain : forward
    Src Address :
    Protocol : 6 (tcp)
    Any Port : 80,443
    L7 Protocol : allow
    Action : accept
  2. Chain : forward
    Dst Address :
    Protocol : 6 (tcp)
    Any Port : 80,443
    L7 Protocol : allow
    Action : accept
  3. Chain : forward
    Src Address :
    Protocol : 6 (tcp)
    Any Port : 80,443
    L7 Protocol : block
    Action : drop
  4. Chain : forward
    Dst Address :
    Protocol : 6 (tcp)
    Any Port : 80,443
    L7 Protocol : block
    Action : drop

*Notes :
You can use src and dst address list to target more than one IP
For this example we’re blocking everyhing except gmail and google, gstatic is for the images and icons in gmail

How to set the permission of all files and folders quickly in Windows

Sometimes when moving or copying files using an administrator account, the permissions change so the files may not be accessible by any standard users.
To change all the files and folders’ permissions back :

  1. Change the standard account to admimistrator
  2. Log in using that account
  3. Right click the main folder that has all the files and folders inside
  4. Go to Properties > Security tab > Advanced > Change Permissions
  5. Add or edit the permissions to your liking and then tick the “Replace all child …” option
  6. Click OK then YES to apply the new permissions
  7. Change the account back to standard account

Tool to check real quality of audio files (e.g mp3, flac, wav)

Spek – https://www.spek.cc/

  • The spectrum of a FLAC (lossless audio) file should go well beyond 22khz
  • When the high frequencies are cut to about 20khz, that means you’re dealing with a 320kbps mp3 audio file
  • High frequencies cut to 16khz equal to a bit rate of around 192kbps 
  • High frequencies cut to 12khz tells you that the audio file has a bit rate of no more than 128, the lowest possible bit rate for an mp3 music file

Or use Audacity, as spek can only check mp3 one by one.

Binary vs ASCII when transferring files using FTP

This is for line breaks handling, ASCII is used to convert line breaks to match the destination operating system.

Basically use ASCII for plain text files (.txt, .php, .js, etc),and use Binary for any other files, or just use the AUTO setting in the FTP client.

More on this in here: https://serverfault.com/questions/110699…
Mirror: https://web.archive.org/web/20230521084…

Design a site like this with WordPress.com
Get started