Shared printers in RDP no longer work by mistake: Handle is invalid

Anonymous
2023-10-19T15:17:58+00:00

Hello everyone,
I'm trying to fix a problem I'm having on Windows Server 2012 R2. After performing some system updates, every printer shared via RDP no longer works correctly because I receive this message: Handle is invalid.

Via Event Viewer I get this:

"The print spooler failed to reopen an existing printer connection because it could not read the configuration information from the registry key S-1-5-21-1528231074-3849690144-2975117709-1013<1>Printers\Connections. The print spooler could not open the registry key. This can occur if the registry key is corrupt or missing, or if the registry recently became unavailable."

Can you help me?

Thank a you a lot!

Windows Server | Remote and virtual desktops | Remote desktop services and terminal services

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-10-20T07:30:53+00:00

    Hi Alessandro,

    Welcome to Microsoft Community.

    I'm Hahn and I'm here to help you with your concern.

    The error message you're encountering, "The print spooler failed to reopen an existing printer connection because it could not read the configuration information from the registry key," suggests that there might be an issue with the registry key related to printer connections on your Windows Server 2012 R2 system.

    Here are some steps you can take to resolve the problem:

    1. Restart the Print Spooler Service:
      • Open the Services management console by pressing Win + R, typing services.msc, and hitting Enter.
      • Locate the "Print Spooler" service in the list.
      • Right-click on it and select "Restart." Alternatively, you can stop and then start the service.
    2. Check Registry Key Permissions:
      • The error message suggests a problem with a specific registry key. You may want to check the permissions on this registry key to ensure that they are correctly configured.
      • Open the Registry Editor by pressing Win + R, typing regedit, and hitting Enter.
      • Navigate to the registry key mentioned in the error message, which is likely something like HKEY_USERS\S-1-5-21-1528231074-3849690144-2975117709-1013\Printers\Connections.
      • Right-click on the "Connections" key, select "Permissions," and ensure that the necessary users or groups have appropriate permissions. The "SYSTEM" and the user account used for RDP should have full control over the key.
    3. Recreate the Printer Connections:
      • In some cases, the printer connections might be corrupted. You can try to delete the printer connections and recreate them.
      • On the server, remove the existing printer connections by going to "Devices and Printers" and deleting any problematic printers.
      • Re-create the printer connections by adding the printers again, ensuring that they are properly shared.
    4. Check for Third-Party Software Conflicts:
      • Third-party software, such as security or printing management software, can sometimes interfere with the print spooler. Try disabling or uninstalling any such software temporarily to see if it resolves the issue.

    Disclaimer: Temporarily turn off antivirus protection. However, keep in mind that if you do so, your device may be vulnerable to threats. So please turn it on immediately once issue fixed.

    1. Check for Corrupted Printer Drivers:
      • Corrupted or incompatible printer drivers can also cause issues. Make sure you're using the latest printer drivers and consider reinstalling the drivers for the affected printers.

    Always be cautious when making changes to the Windows Registry, as improper edits can cause further problems. It's recommended to back up the registry before making any changes.

    If the issue persists, you may need to restore the registry key from a backup or reinstall the printer drivers. I hope this helps! Let me know if you have any further questions.

    Your Sincerely

    Hahn - MSFT | Microsoft Community Support Specialist

    0 comments No comments
  2. Anonymous
    2023-10-20T10:51:50+00:00

    Ciao, Alessandro,

    Benvenuto nella comunità Microsoft.

    Mi chiamo Hahn e sono qui per aiutarti con la tua preoccupazione.

    Il messaggio di errore che riscontri, "Lo spooler di stampa non è riuscito a riaprire una connessione alla stampante esistente perché non è riuscito a leggere le informazioni di configurazione dalla chiave di registro", suggerisce che potrebbe esserci un problema con la chiave di registro relativa alle connessioni alla stampante sul tuo Sistema Windows Server 2012 R2.

    Ecco alcuni passaggi che puoi eseguire per risolvere il problema:

    1. Riavviare il servizio spooler di stampa:
    • Apri la console di gestione dei servizi premendo "Win + R", digitando "services.msc" e premendo Invio.
    • Individuare il servizio "Spooler di stampa" nell'elenco.
    • Fai clic destro su di esso e seleziona "Riavvia". In alternativa è possibile interrompere e quindi avviare il servizio.
    1. Controlla le autorizzazioni della chiave di registro:
    • Il messaggio di errore suggerisce un problema con una chiave di registro specifica. Potresti voler controllare le autorizzazioni su questa chiave di registro per assicurarti che siano configurate correttamente.
    • Apri l'editor del Registro di sistema premendo "Win + R", digitando "regedit" e premendo Invio.
    • Passare alla chiave di registro menzionata nel messaggio di errore, che probabilmente è qualcosa come "HKEY_USERS\S-1-5-21-1528231074-3849690144-2975117709-1013\Printers\Connections".
    • Fai clic con il pulsante destro del mouse sul tasto "Connessioni", seleziona "Autorizzazioni" e assicurati che gli utenti o i gruppi necessari dispongano delle autorizzazioni appropriate. Il "SISTEMA" e l'account utente utilizzato per RDP dovrebbero avere il pieno controllo sulla chiave.
    1. Ricreare le connessioni della stampante:
    • In alcuni casi, i collegamenti della stampante potrebbero essere danneggiati. Puoi provare a eliminare le connessioni della stampante e ricrearle.
    • Sul server, rimuovi le connessioni stampante esistenti andando su "Dispositivi e stampanti" ed eliminando eventuali stampanti problematiche.
    • Ricreare le connessioni delle stampanti aggiungendo nuovamente le stampanti, assicurandosi che siano condivise correttamente.
    1. Verifica la presenza di conflitti software di terze parti:
    • Software di terze parti, come software di sicurezza o di gestione della stampa, a volte possono interferire con lo spooler di stampa. Prova a disabilitare o disinstallare temporaneamente qualsiasi software di questo tipo per vedere se risolve il problema.
    1. Verificare la presenza di driver della stampante danneggiati:
    • Anche i driver della stampante danneggiati o incompatibili possono causare problemi. Assicurati di utilizzare i driver della stampante più recenti e valuta la possibilità di reinstallare i driver per le stampanti interessate.

    Prestare sempre attenzione quando si apportano modifiche al registro di Windows, poiché modifiche improprie possono causare ulteriori problemi. Si consiglia di eseguire il backup del registro prima di apportare qualsiasi modifica.

    Se il problema persiste, potrebbe essere necessario ripristinare la chiave di registro da un backup o reinstallare i driver della stampante. Spero che aiuti! Fammi sapere se hai altre domande.

    Cordiali saluti

    Hahn-MSFT | Specialista del supporto della community Microsoft

    Hi Hahn,

    First of all, thank you for replying to me.

    Clearly I tried to perform various steps to solve the problem but all without success.

    • print spooler reset
    • sfc scannow
    • system updates.

    As for the registry keys, "HKEY_USERS\S-1-5-21-1528231074-3849690144-2975117709-1013\Printers\Connections" this one does not exist, but stops at "Printers".

    Unfortunately I don't even have a backup of this type where I can perform a restore.

    Is there anything else I can do?

    0 comments No comments