To modify the file, you must change its ownership from TrustedInstaller to the Administrators group and grant full control permissions. Open as an Administrator. Run the following command to take ownership of the file: takeown /f C:\Windows\System32\termsrv.dll /a Use code with caution.
: Microsoft updates routinely replace modified system files with factory versions. termsrv.dll patch windows server 2016
Note: Patterns change slightly depending on the exact Windows Server 2016 build version. Search for: 39 81 3C 06 00 00 0F 84 B1 7D 02 00 Replace with: B8 00 01 00 00 90 89 81 3C 06 00 00 Save the changes and close the hex editor. Step 5: Restart the Remote Desktop Service Restart the service to apply the patch: net start TermService Use code with caution. Using Automated RDP Wrapper Tools To modify the file, you must change its
Microsoft frequently updates termsrv.dll during monthly cumulative updates. A security patch will overwrite your modified file, requiring you to re-apply the patch. Prerequisites Before Patching : Microsoft updates routinely replace modified system files
You cannot modify termsrv.dll while the Remote Desktop service is actively running. Press Windows Key + R , type services.msc , and press . Locate Remote Desktop Services in the list. Right-click it and select Stop . Alternatively, open an elevated PowerShell window and run: powershell Stop-Service -Name TermService -Force Use code with caution. Step 2: Take Ownership of termsrv.dll
Once the file is replaced or saved, restart the services to apply the changes.
RDP Wrapper is often preferred because it leaves the original termsrv.dll untouched, potentially offering a slightly less invasive method. However, it requires an rdpwrap.ini configuration file that is perfectly compatible with your specific Windows Server 2016 build.