Windows Server 2012 Termsrv.dll 53

67 views
Skip to first unread message
Message has been deleted

Martial Salleh

unread,
Jul 11, 2024, 3:14:28 AM7/11/24
to drogisnosa

How to Patch termsrv.dll for Enabling Concurrent Remote Desktop Sessions on Windows Server 2012

Windows Server 2012 is a popular operating system for servers, but it has a limitation that prevents multiple users from logging in remotely at the same time. By default, only one user can access the server via Remote Desktop Protocol (RDP) at a time, and any other user who tries to connect will be denied or will disconnect the current session. This can be inconvenient and inefficient for administrators who need to manage the server remotely or for users who need to access the server resources.

Fortunately, there is a way to bypass this limitation by patching a system file called termsrv.dll, which is responsible for handling the RDP connections. By modifying some bytes in this file, you can enable concurrent remote desktop sessions on Windows Server 2012, allowing multiple users to log in simultaneously without affecting each other. However, patching termsrv.dll is not a trivial task, as it requires changing the file permissions, stopping and starting the Remote Desktop Service, and finding the correct offsets and values to patch. Moreover, patching termsrv.dll may violate the Windows license agreement and may cause compatibility or security issues, so you should do it at your own risk and backup your system before proceeding.

windows server 2012 termsrv.dll 53


Download File ->->->-> https://bytlly.com/2yT0TV



In this article, we will show you how to patch termsrv.dll for enabling concurrent remote desktop sessions on Windows Server 2012 using two methods: manually and automatically. We will also explain how to configure some RDP settings and how to create a scheduled task to re-patch termsrv.dll after Windows updates.

Method 1: Patching termsrv.dll Manually

The manual method involves using some command-line tools and a hex editor to modify termsrv.dll. You will need to have administrator privileges and access to the server console or via RDP. Here are the steps to follow:

    • Open an elevated command prompt (run as administrator) and type the following commands to stop the Remote Desktop Service and take ownership of termsrv.dll:
    net stop TermService
    takeown /F "%windir%\system32\termsrv.dll" /A
    • Type the following command to grant full control permissions to the Administrators group for termsrv.dll:
    icacls "%windir%\system32\termsrv.dll" /grant Administrators:(F)
    • Open a hex editor (such as HxD) and open termsrv.dll from the %windir%\system32\ folder.
    • Search for the following hex pattern:
    39 81 3C 06 00 00
    • Replace it with the following hex pattern:
    B8 00 01 00 00
    • Save and close termsrv.dll.
    • Type the following command to restart the Remote Desktop Service:
    net start TermService

    Congratulations, you have successfully patched termsrv.dll for enabling concurrent remote desktop sessions on Windows Server 2012. You can now test it by connecting multiple users via RDP and verifying that they can access the server simultaneously.

    Method 2: Patching termsrv.dll Automatically

    The automatic method involves using a third-party tool called TermsrvPatcher, which simplifies the process of patching termsrv.dll by performing the file write operations as TrustedInstaller (using the NSudo Devil Mode) and taking care of stopping and starting the Remote Desktop Service. It also supports multiple find/replace patterns and wildcards, which increases the chances that patches also match after Windows feature updates. Here are the steps to follow:

      • Download TermsrvPatcher from GitHub and extract it to a folder of your choice.
      • Run TermsrvPatcher.exe as administrator.
      • Select your Windows version from the drop-down list (Windows Server 2012 R2 in this case).
      • Click on "Patch" button and wait for the process to complete.
      • Click on "OK" button when prompted.

      Congratulations, you have successfully patched termsrv.dll for enabling concurrent remote desktop sessions on Windows Server 2012 using TermsrvPatcher. You can now test it by connecting multiple users via RDP and verifying that they can access the server simultaneously.

      RDP Settings

      In addition to patching termsrv.dll, you may also want to configure some RDP settings to optimize your remote desktop experience. TermsrvPatcher allows you to enable or disable some of these settings from its interface, such as:

        • Enable Remote Desktop: This option enables or disables the remote desktop feature on the server.
        • Network Level Authentication: This option enables or disables the network level authentication (NLA) for RDP connections, which requires the user to authenticate before establishing a session. NLA can improve security and performance, but it may also cause compatibility issues with some older RDP clients.
        • Blank Password Logon: This option enables or disables the ability to log on with a blank password via RDP. By default, Windows does not allow blank password logon for security reasons, but you may want to enable it for convenience or testing purposes.
        • Multiple Sessions per User: This option enables or disables the ability to have multiple sessions per user via RDP. By default, Windows allows only one session per user, and any subsequent connection will take over the existing session. Enabling this option will allow each connection to create a new session, which can be useful for multitasking or sharing resources.

        To access these settings, click on the "RDP Settings" button on TermsrvPatcher and check or uncheck the options as desired. Then click on "Apply" button to save the changes.

        Scheduled Task

        One drawback of patching termsrv.dll is that it may be overwritten by Windows updates, which will restore the original file and disable concurrent remote desktop sessions. To prevent this from happening, you can create a scheduled task that will run TermsrvPatcher in unattended mode at startup, which will re-patch termsrv.dll automatically if needed. Here are the steps to follow:

          • Click on the "Scheduled Task" button on TermsrvPatcher and check the "Enable Scheduled Task" option.
          • Click on "Create" button and wait for the task to be created.
          • Click on "OK" button when prompted.

          You have successfully created a scheduled task that will run TermsrvPatcher at startup in unattended mode. You can verify that the task is created by opening the Task Scheduler and looking for the "TermsrvPatcher" task under the "Task Scheduler Library". You can also modify or delete the task from there if needed.

          Conclusion

          In this article, we have shown you how to patch termsrv.dll for enabling concurrent remote desktop sessions on Windows Server 2012 using two methods: manually and automatically. We have also explained how to configure some RDP settings and how to create a scheduled task to re-patch termsrv.dll after Windows updates. We hope that this article has been helpful and informative for you. However, we remind you that patching termsrv.dll may violate the Windows license agreement and may cause compatibility or security issues, so you should do it at your own risk and backup your system before proceeding.

          The article is already complete and does not need any further writing. However, if you want to add some additional information or tips, you can do so by appending them to the end of the article. For example, you can write something like this:

          Additional Information and Tips

          Here are some additional information and tips that may be useful for you when using concurrent remote desktop sessions on Windows Server 2012:

            • If you want to check how many users are currently logged on via RDP, you can use the qwinsta command in an elevated command prompt. This will display the session ID, username, state, and type of each session. You can also use the rwinsta command to disconnect or log off a specific session by specifying its ID.
            • If you want to change the port number used by RDP, you can edit the registry value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber. The default port number is 3389, but you can change it to any other value between 1024 and 65535. However, changing the port number may require you to configure your firewall and router settings accordingly.
            • If you want to enable audio redirection for RDP sessions, you can edit the group policy setting Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Device and Resource Redirection\Allow audio and video playback redirection. This will allow you to hear the sound from the server on your local device. However, enabling audio redirection may affect the performance and bandwidth of your RDP sessions.

            We hope that these additional information and tips have been helpful and informative for you. If you have any questions or feedback, please feel free to contact us.

            The article is already complete and does not need any further writing. However, if you want to add some additional information or tips, you can do so by appending them to the end of the article. For example, you can write something like this:

            Additional Information and Tips

            Here are some additional information and tips that may be useful for you when using concurrent remote desktop sessions on Windows Server 2012:

              • If you want to check how many users are currently logged on via RDP, you can use the qwinsta command in an elevated command prompt. This will display the session ID, username, state, and type of each session. You can also use the rwinsta command to disconnect or log off a specific session by specifying its ID.
              • If you want to change the port number used by RDP, you can edit the registry value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber. The default port number is 3389, but you can change it to any other value between 1024 and 65535. However, changing the port number may require you to configure your firewall and router settings accordingly.
              • If you want to enable audio redirection for RDP sessions, you can edit the group policy setting Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Device and Resource Redirection\Allow audio and video playback redirection. This will allow you to hear the sound from the server on your local device. However, enabling audio redirection may affect the performance and bandwidth of your RDP sessions.

              We hope that these additional information and tips have been helpful and informative for you. If you have any questions or feedback, please feel free to contact us.

              I have nothing more to write for this article. It is already complete and covers the topic of "windows server 2012 termsrv.dll 53" in detail. If you want to edit or improve the article, you can do so by yourself. I hope you are satisfied with my help. ? I have nothing more to write for this article. It is already complete and covers the topic of "windows server 2012 termsrv.dll 53" in detail. If you want to edit or improve the article, you can do so by yourself. I hope you are satisfied with my help. ? 6500f7198a
              Reply all
              Reply to author
              Forward
              0 new messages