none
RemoteApp Default Printer Redirection Not Working in Server 2016 RRS feed

  • Question

  • We are experiencing a RemoteApp default printer redirection issue in Windows Server 2016 that we are not seeing in Windows Server 2012R2.   We have the following simple environment:

    1.        Windows Server 2012R2 with RDS Quick Start installed.
    2.        Windows Server 2016 with RDS Quick Start installed (configured identically)
    3.        Window 10 Client with attached HP printer configured as “Default” printer.

    When we launch WordPad as a RemoteApp on the client (via RDWeb) and try to print a document, we see different behaviors: 1) When launched on Server 2012R2, the client’s default printer (HP printer) is shown as the default printer (expected behavior), 2) When launched on Server 2016, the server’s default printer (XPS Document) is shown as the default printer (unexpected behavior).

    We’ve verified that all of the Group policies and connection settings are correct and identical between the two servers.  However we noticed the values of HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows:Device keys are different:  2012R shows redirection to client printer, 2016 shows server printer.

    Is this a bug in Server 2016?  Anything else we should check or configure?

    Thanks,

    cyorlano

    Wednesday, December 7, 2016 6:18 PM

Answers

  • Retested with wordpad. I discovered I had another session open which was skewing results.  Wordpad did behave as should.  However our software product had the issue still as described.  On further research, the software had a routine that was using the GetProfileString API call. The returned information from API call was being used to determined the default printer. I believe this call is looking for values from HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows:Device:  The values keys are different:  Server 2012 R2 shows redirection to client printer, Server 2016 shows server printer. I believe this call is not functioning the same between Server 2012 R2 and 2016.  I changed the call to now use the API GetDefaultPrinter and the software is functioning correctly on Server 2016.  So I am closing this case.  However, feel free to add any input. Thanks for great input - Cyorlano.

    • Marked as answer by cyorlano Thursday, December 15, 2016 1:23 AM
    Thursday, December 15, 2016 1:23 AM

All replies

  • Hi,

    I will try to test this in my lab, will let you know the result as soon as tests are finished.

    Best Regards,

    Amy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, December 8, 2016 12:54 PM
    Moderator
  • cyorlano,

    Does your HP printer also show up in WordPad on the 2016 server redirected or does it not show at all?

    Zach

    Friday, December 9, 2016 8:20 PM
  • Same problem over here. Windows 2016 RDS does not map printers at least since the latest updates.

    Monday, December 12, 2016 9:08 AM
  • Hi,

    1. When launching Wordpad, please click the Show Details on the initial prompt.  Is Printers checked on the prompt window?

    2. Have you tested with other client PCs/different client OS versions/different local printers to see if there is any change?

    3. Any warnings/errors in the server's event log?

    I tested with fresh install of Server 2016 + all updates, and my local printers were redirected for Notepad running as RemoteApp.

    -TP

    Monday, December 12, 2016 1:39 PM
    Moderator
  • Hi,

    I have just tested in my lab with Windows Server 2016 Datacenter OS Build 14393, and printer redirection works.

    Kindly test as TP mentioned above, and terminal services log can be found under

    Event Viewer -> Applications and Services Logs\ Microsoft\ Windows.

    Best Regards,

    Amy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, December 12, 2016 1:59 PM
    Moderator
  • I have two servers, Windows Server 2016 pretty clean with all updates.  No GPOs or tweaks. All RDS roles installed (except gateway)

    I don't use remote app, I use a full desktop connection instead. In both of them printers are not redirected. Not a single error or warning in the event viewer. And I made sure that the client has the redirect printers checked.

    :(

    Monday, December 12, 2016 3:01 PM
  • I have two servers, Windows Server 2016 pretty clean with all updates.  No GPOs or tweaks. All RDS roles installed (except gateway)

    I don't use remote app, I use a full desktop connection instead. In both of them printers are not redirected. Not a single error or warning in the event viewer. And I made sure that the client has the redirect printers checked.

    :(

    Hi Dani TP,

    Please create a new question with specific details of your environment.  Things like precise OS version/edition on server and client PCs, what you have tried, configuration, etc.

    Thanks.

    -TP


    • Edited by TP []MVP, Moderator Monday, December 12, 2016 3:07 PM
    • Marked as answer by cyorlano Thursday, December 15, 2016 1:10 AM
    • Unmarked as answer by cyorlano Thursday, December 15, 2016 1:10 AM
    Monday, December 12, 2016 3:06 PM
    Moderator
  • Retested with wordpad. I discovered I had another session open which was skewing results.  Wordpad did behave as should.  However our software product had the issue still as described.  On further research, the software had a routine that was using the GetProfileString API call. The returned information from API call was being used to determined the default printer. I believe this call is looking for values from HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows:Device:  The values keys are different:  Server 2012 R2 shows redirection to client printer, Server 2016 shows server printer. I believe this call is not functioning the same between Server 2012 R2 and 2016.  I changed the call to now use the API GetDefaultPrinter and the software is functioning correctly on Server 2016.  So I am closing this case.  However, feel free to add any input. Thanks for great input - Cyorlano.

    • Marked as answer by cyorlano Thursday, December 15, 2016 1:23 AM
    Thursday, December 15, 2016 1:23 AM
  • What was the solution ??
    Thursday, May 18, 2017 8:46 PM
  • Check out this key:

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\SessionDefaultDevices

    Reference:  Change #3: Per-session Default Printers

    https://blogs.technet.microsoft.com/enterprisemobility/2007/05/03/introducing-terminal-services-easy-print-part-2/

    Friday, October 6, 2017 2:38 PM
  • This is and old link that doesn't apply

    Thursday, October 26, 2017 7:05 PM
  • could you tell me steps you took to change this call. I see this same issue. No RDS software holds the default printer of the remote user. thanks again!

    Thursday, October 26, 2017 7:06 PM
  • We're seeing the same issue with Server 2016.

    Most "modern" programs, Word, Excel, Chrome etc. see the correct default printer but older programs only see the default printer that local to the server. 

    The same older programs in Server 2012 have no issue seeing the redirected printer as default. 

    Friday, November 3, 2017 12:51 PM
  • Found a VB script that will copy registry the key

    http://www.itninja.com/question/copy-key-from-registry

    Just incase the link dies: 

    Option Explicit
    On Error Resume Next
    Const HKCU = &H80000001
    Dim strComputer, objReg, strOrigPath, strNewPath, arrKeys, strKey, strPrinter

    strComputer = "."
    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ 
     strComputer & "\root\default:StdRegProv")
    strOrigPath = "Software\Microsoft\Windows NT\CurrentVersion\Windows\SessionDefaultDevices"
    strNewPath = "Software\Microsoft\Windows NT\CurrentVersion\Windows"

    objReg.EnumKey HKCU, strOrigPath, arrKeys
    For Each strKey In arrKeys
        objReg.GetStringValue HKCU, strOrigPath & "\" & strKey, "Device", strPrinter
        If strPrinter <> vbNull Then
         objReg.SetStringValue HKCU, strNewPath, "Device", strPrinter
        End If
    Next

    Set strComputer = Nothing
    Set objReg = Nothing
    Set strOrigPath = Nothing
    Set strNewPath = Nothing
    Set arrKeys = Nothing
    Set strKey = Nothing
    Set strPrinter = Nothing

    • Proposed as answer by antodio Saturday, September 15, 2018 12:41 PM
    Friday, November 3, 2017 1:20 PM
  • I have same problem, we have a collection of remoteapp session servers with 2016 and in the same farm y have installed another remoteapp sesion host server with windows server 2012 r2. Identical  configuration. Local printer redirection works great in 2012 and dont work in 2016. It s very frustrating. I have open a ticket with microsfot but no solution....

    Friday, November 3, 2017 1:27 PM
  • So this VB script will work for each RD user? Or is this just for the base admin? Does it have to executed at each new login or how does this work?

    Thank you!

     
    Wednesday, November 8, 2017 8:52 PM
  • please share if you get an answer. thank you! I've trying to fix this for about 2 months now. 

    • Proposed as answer by Javier Zabalza Friday, December 29, 2017 10:47 AM
    • Unproposed as answer by Javier Zabalza Friday, December 29, 2017 10:47 AM
    Wednesday, November 8, 2017 8:57 PM
  • After a lot of investigating I discover that in rds 2016 host session you have to disable the policy of Easy print driver. In my lab i tried to

    Disable the computer policy in the host session:

    Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Printer Redirection > Use Remote Desktop Easy Print printer driver first (set to disabled)

    Afther this, the rds works redirecting local printers of the users as prior versions of windows server.

    • Proposed as answer by Javier Zabalza Friday, December 29, 2017 12:49 PM
    Friday, December 29, 2017 10:48 AM
  • Worked!! Thanks a lot
    • Proposed as answer by benelson777 Thursday, August 1, 2019 10:15 PM
    Monday, August 13, 2018 3:06 PM
  • unbelievable ! I am on this problem since 1 week! I had completely lost hope. After going around the net I came across your post. it works !!!! amazing. I have to deploy the vbs each time my clients log in by GPO. Thank you !!!
    Saturday, September 15, 2018 12:41 PM
  • This was working until just recently. (Solution from 


    Javier Zabalza above). Even with this setting the initial problem has returned.  Clients always default to the server printer instead of their own redirected printer.  Windows Server 2016 1607.
    • Edited by MZimbaro Friday, March 29, 2019 1:49 PM
    Friday, March 29, 2019 1:35 PM