Fix Redirected Printer bug on HP devices

1. Create a new batch file ‘FixRedirectedPrinter.bat’
2. Insert the following commands into file:

taskkill /f /im mstsc.exe

set /p PrinterNameOld=<c:\users\%username%\Pictures\PrinterName.txt

timeout /t 1

time /t > c:\users\%username%\Pictures\PrinterName.txt

timeout /t 1

set /p PrinterNameNew=<c:\users\%username%\Pictures\PrinterName.txt

rundll32 printui.dll,PrintUIEntry /Xs /n "%PrinterNameOld%" printername "%PrinterNameNew%"

timeout /t 1

c:\users\%username%\Pictures\RemoteServer01.rdp

3. Every time your remote server lose the ability to print
Just double-click and run the batch
After few secs you will be able to print again!

Enjoy 🙂

taskkill /f /im mstsc.exe set /p PrinterNameOld=<c:\users\%username%\Pictures\PrinterName.txt timeout /t 1 time /t > c:\users\%username%\Pictures\PrinterName.txt timeout /t 1 set /p PrinterNameNew=<c:\users\%username%\Pictures\PrinterName.txt rundll32 printui.dll,PrintUIEntry /Xs /n “%PrinterNameOld%” printername “%PrinterNameNew%” timeout /t 1 c:\users\%username%\Pictures\RemoteServer01.rdp
taskkill /f /im mstsc.exe

set /p PrinterNameOld=<c:\users\%username%\Pictures\PrinterName.txt

timeout /t 1

time /t > c:\users\%username%\Pictures\PrinterName.txt

timeout /t 1

set /p PrinterNameNew=<c:\users\%username%\Pictures\PrinterName.txt

rundll32 printui.dll,PrintUIEntry /Xs /n “%PrinterNameOld%” printername “%PrinterNameNew%”

timeout /t 1

c:\users\%username%\Pictures\RemoteServer01.rdp