I achieved some interesting results:
I performed the steps mentioned above:
- Open registry with psexec -i –s c:\windows\regedit.exe
- Delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider" and then Re-Create it (empty)
- Add under Client Side Rendering Print Provider "RemovePrintersAtLogoff" / 00000000
- Export HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM\PrintQueues , delete PRINTENUM Key it, then re-create it, then Import again all the Exported Items of PrintQueues
- Do the same step for HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Enum\SWD\PRINTENUM and HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\SWD\PRINTENU
- Restart the Server
After this, I finally got rid of all the odd registry entries that were coming back and ghost printers. I logged via RDweb with a User, connected a printer from print server, set it as default. Logged out, Logged in --> Standard Printer OK
I did the same by re-logging to RDweb, Logging in, and the Standard Printer was still ok!
I believed that finally this hell was over, but there is still the major issue: if the User make a proper Logoff/Login, everything is fine.
But if the User just disconnect the session, and then reconnect, the standard printer is lost again. I really have no clues what RDS Protocol is doing and I've really no clues why on session disconnect/reconnect he's running again a "scan" of all printers, that it takes a few minutes before they appear on Printer and devices in control panel or in System Configuration GUI.
It's already a good improvement, and I think if nothing else can be found, i'll just force a logout by disconnecting to make sure the Standard Printer will be kept.
But I'd really like to find a fix for this. It doesn't make any sense that a user cannot disconnect/reconnect to a session and loosing the Standard printer this way.
Any further help will be greatly appreciated, thanks!
Edit 30.12.2020: One day after I posted this, actually I wasn't able to reproduce the issue anymore. Restarting all RDSH and the Broker, and setting a daily task to stop the spooler, delete print queues, start the spooler at night, solved actually the issue. Standard Printer don't get lost anymore with disconnect/reconnect. I've done the same operation on the RDS Prod collection and achieved the same positive result.