Automatically repair RDP Wrapper after Windows Update — regenerate termsrv.dll / rdpwrap.ini offsets, fix Windows Server MaxSessions, and restore concurrent Remote Desktop sessions on boot.
git clone https://github.com/BuildWithSubha/RDPWrap-Self-Heal.git
# Right-click Install.bat → Run as administrator
Why it breaks · Features · Quick Start · Usage · Troubleshooting · FAQ · Contributing
- What is RDPWrap Self-Heal?
- Why RDP Wrapper breaks after Windows Update
- Who this is for
- Features
- Quick Start: Install multi-session RDP
- System requirements
- Installation guide
- Usage and commands
- Architecture
- How self-heal works
- Repository layout
- Technical notes
- FAQ
- Troubleshooting common RDP Wrapper errors
- Roadmap
- Contributing
- Security and legal
- License
- Credits and related projects
RDPWrap Self-Heal is an open-source installer and automation package for RDP Wrapper on Windows 10, Windows 11, and Windows Server (2019 / 2022 / 2025). It keeps multiple concurrent Remote Desktop (RDP) sessions working when Microsoft updates replace termsrv.dll and invalidate rdpwrap.ini offsets.
In plain terms: if RDP Wrapper stops after a Windows Update — RDPConf shows [not supported], or worse [fully supported] while the third user still disconnects — this project installs the wrapper, regenerates offsets with OffsetFinder, enforces Server MaxSessions=0, and registers boot + daily repair tasks so multi-session RDP can recover automatically.
| Capability | What you get |
|---|---|
| Multi-session RDP | Concurrent Active sessions for multiple users |
| Post-update repair | Auto-heal after termsrv.dll changes |
| Windows Server fix | Removes the common Remote Admin 2-session cap |
| Homelab / lab friendly | No RDS CALs path (unsupported by Microsoft — see legal) |
Verified on Windows Server 2025 with three concurrent Active RDP sessions after a termsrv update broke a long-running install.
RDP Wrapper enables concurrent Remote Desktop sessions by patching policy checks inside Windows Terminal Services (termsrv.dll). Every Windows Update that replaces termsrv.dll can change memory offsets. Without updated rdpwrap.ini sections, multi-session RDP fails — often in confusing ways:
| Symptom people search for | What you see |
|---|---|
| “RDP Wrapper not supported” | RDPConf / RDP_CnC shows [not supported] |
| “RDPConf fully supported but third user disconnects” | Green status, then a 30-second disconnect prompt for the 3rd session |
| “Windows Server only allows 2 RDP sessions” | Cap remains even when offsets look correct (MaxSessions=2) |
Important
Green RDPConf is not proof of working multi-session RDP.
Run query user and confirm 3+ Active sessions — that is the real test.
- Homelab and small-team admins who need multiple RDP sessions on Windows 10/11
- Operators running Windows Server without (or instead of) full RDS Session Host + RDS CALs
- Anyone whose RDP Wrapper broke after Windows Update and needs a repeatable repair path
- Maintainers who want OffsetFinder + community
rdpwrap.ini+ scheduled self-heal in one package
If you need Microsoft-supported multi-user Remote Desktop, use the official Remote Desktop Session Host role and RDS licensing instead.
|
|
|
|
| Task | When | Runs as | Purpose |
|---|---|---|---|
RDPWrap-SelfHeal-Boot |
~2 minutes after startup | SYSTEM (Highest) |
Repair after update reboot |
RDPWrap-SelfHeal-Daily |
Every day at 03:00 | SYSTEM (Highest) |
Catch missed repairs |
Both run -Mode Repair from C:\Program Files\RDP Wrapper\.
git clone https://github.com/BuildWithSubha/RDPWrap-Self-Heal.git
cd RDPWrap-Self-HealOr download the repository ZIP from GitHub and extract it.
Recommended — one click
Right-click Install.bat → Run as administrator
Or elevated PowerShell
Set-ExecutionPolicy -Scope Process Bypass
.\scripts\Install-RDPWrapSelfHeal.ps1 -Mode InstallOpen C:\Program Files\RDP Wrapper\RDP_CnC.exe and confirm:
- Wrapper Installed
- Service Running
- Listener Listening
- Single session per user unchecked
-
[fully supported](ideal — not required for proof)
Keep one session open, connect two more users, then run:
query userSuccess example (3 Active RDP sessions):
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
Administrator rdp-tcp#0 1 Active . 7/23/2026 9:00 AM
test rdp-tcp#1 2 Active . 7/23/2026 9:05 AM
ankit rdp-tcp#2 3 Active . 7/23/2026 9:06 AM
Three or more Active lines means multi-session Remote Desktop is working.
| Requirement | Details |
|---|---|
| Operating system | Windows 10, Windows 11, or Windows Server 2019 / 2022 / 2025 |
| Architecture | x64 only |
| Privileges | Administrator for install and repair |
| PowerShell | 5.1 or later |
| Network | Optional — required only for community rdpwrap.ini fallback |
| Symbols / PDB | Optional — enables offline OffsetFinder against termsrv.dll |
Warning
Do not install alongside RDS-RD-Server (Remote Desktop Session Host).
Choose either RDP Wrapper or official RDS — not both.
- Validates Administrator rights and package files
- Deploys
bin\+ OffsetFinder →C:\Program Files\RDP Wrapper\ - Copies the self-heal script for scheduled tasks
- Enforces
MaxSessions=0inrdpwrap.ini(critical on Windows Server) - Registers boot + daily repair tasks
- Runs an initial repair: hook TermService, apply offsets, update registry, restart the service
C:\Program Files\RDP Wrapper\
├── rdpwrap.dll # RDP Wrapper library
├── rdpwrap.ini # Offset database + SLPolicy
├── RDPWInst.exe # Wrapper installer / uninstaller
├── RDP_CnC.exe # RDP control panel (RDPConf-style)
├── RDPWrapOffsetFinder.exe # Offset generator
├── Install-RDPWrapSelfHeal.ps1 # Self-heal orchestrator
└── logs\
└── selfheal_YYYYMMDD.log
Caution
Security tools often quarantine rdpwrap.dll as potentially unwanted software.
Add an exclusion for C:\Program Files\RDP Wrapper\ and this repository folder.
If the DLL is removed, restore bin/rdpwrap.dll and re-run Install.
# Remove self-heal tasks only (keep RDP Wrapper)
.\scripts\Install-RDPWrapSelfHeal.ps1 -Mode Uninstall
# Fully remove the RDP Wrapper hook from TermService
& "$env:ProgramFiles\RDP Wrapper\RDPWInst.exe" -u| Mode | Command | When to use |
|---|---|---|
| Install | -Mode Install |
First-time setup of multi-session RDP Wrapper |
| Repair | -Mode Repair |
After Windows Update if auto-heal did not finish |
| Force repair | -Mode Repair -Force |
Always regenerate termsrv offsets |
| Status | -Mode Status |
Diagnose wrapper, MaxSessions, listener, sessions |
| Uninstall | -Mode Uninstall |
Remove self-heal tasks only |
# Fresh install of RDP Wrapper Self-Heal
.\scripts\Install-RDPWrapSelfHeal.ps1 -Mode Install
# Repair RDP Wrapper after Windows Update
.\scripts\Install-RDPWrapSelfHeal.ps1 -Mode Repair -Force
# Check multi-session RDP health
.\scripts\Install-RDPWrapSelfHeal.ps1 -Mode Status
# Same entry point the scheduled tasks use
& "$env:ProgramFiles\RDP Wrapper\Install-RDPWrapSelfHeal.ps1" -Mode RepairYou can launch the web-based monitoring dashboard to inspect health metrics, active RDP sessions, and logs in your browser:
- Right-click
dashboard\Launch-Dashboard.bat→ Run as administrator. - Open
http://localhost:8888in any browser.
Features:
- 🟢 Live Health Indicator:
termsrv.dlloffset match, listener, and service hook status. - 👥 Active RDP Session Manager: View connected user accounts and disconnect/logoff sessions with 1-click.
- ⚡ 1-Click Self-Heal Repair: Trigger dynamic offset repair directly from the UI.
- 📜 Log Terminal Viewer: Embedded live logs view (
selfheal_YYYYMMDD.log).
Get-Content "$env:ProgramFiles\RDP Wrapper\logs\selfheal_$(Get-Date -Format yyyyMMdd).log" -Tail 50| Layer | Component | Role |
|---|---|---|
| Entry | Install.bat |
Elevation check → PowerShell |
| Orchestration | scripts/Install-RDPWrapSelfHeal.ps1 |
Modes, logging, error handling |
| Runtime | bin/ |
rdpwrap.dll, installer, ini, RDP_CnC |
| Offsets | tools/OffsetFinder/ |
PDB / pattern offset generation for termsrv.dll |
| Persistence | Scheduled Tasks | Automatic repair after Windows Update |
flowchart TD
A[Start Repair] --> B[Read FileVersionRaw]
B --> C{ini has version section?}
C -->|No| G[Generate offsets]
C -->|Yes| D{rdpwrap.dll loaded?}
D -->|No| G
D -->|Yes| E{Port 3389 listening?}
E -->|No| G
E -->|Yes| F{-Force?}
F -->|Yes| G
F -->|No| H[Skip regen — enforce MaxSessions + registry]
G --> I[OffsetFinder]
I -->|fail| J[Community ini]
J -->|fail| K[Error]
I -->|ok| L[Merge ini + MaxSessions=0]
J -->|ok| L
L --> M[Restart TermService]
M --> N[Verify hook + listener]
H --> N
sequenceDiagram
participant WU as Windows Update
participant OS as Windows
participant Task as Self-Heal Task
participant Script as PowerShell Script
participant Finder as OffsetFinder
participant Ini as rdpwrap.ini
participant TS as TermService
WU->>OS: Replace termsrv.dll
OS->>OS: Reboot
Note over Task: ~2 minutes after startup
Task->>Script: -Mode Repair
Script->>OS: Read FileVersionRaw
Script->>Ini: Check for version section
alt Missing section or -Force
Script->>Finder: Analyze termsrv.dll
Finder-->>Script: version + version-SLInit
Script->>Ini: Merge sections, MaxSessions=0
Script->>TS: Restart
else Already healthy
Script->>Ini: Enforce MaxSessions only
end
Script->>Script: Verify wrapper loaded + :3389 listening
How offsets are resolved
- OffsetFinder — analyze local
termsrv.dll(PDB/symbols when available) - Community ini — fetch matching sections from sebaxakerhtc/rdpwrap.ini
- Fail clearly — report the
termsrvversion that still needs offsets
Jump to: Quick Start · Troubleshooting · FAQ
RDPWrap-SelfHeal/
├── Install.bat # One-click elevated installer
├── README.md # Documentation (this file)
├── LICENSE # Apache-2.0
├── NOTICE # Third-party notices
├── CREDITS.md
├── .gitignore
│
├── bin/ # RDP Wrapper runtime
│ ├── rdpwrap.dll
│ ├── rdpwrap.ini # Community offsets + MaxSessions=0
│ ├── RDPWInst.exe
│ ├── RDP_CnC.exe
│ └── update.bat
│
├── scripts/
│ └── Install-RDPWrapSelfHeal.ps1 # Install / Repair / Status / Uninstall
│
├── tools/OffsetFinder/
│ ├── 64bit/ # Deployed finder (+ optional PDBs)
│ └── 32bit/ # Bundled; not used by the x64 installer
│
└── docs/
├── TROUBLESHOOTING.md # Extended RDP Wrapper troubleshooting
├── PUBLISH.md # Maintainer publish + discoverability checklist
└── images/ # README diagrams (PNG for GitHub; SVG sources kept)
├── hero-banner.jpg
├── features-overview.png
├── proof-vs-rdpconf.png
├── architecture.png
└── selfheal-flow.png
Windows Explorer may show 10.0.26100.32684 while the PE private build is 10.0.26100.33158. RDP Wrapper matches the raw four-part version in rdpwrap.ini. This project always uses raw:
$vi = (Get-Item $env:SystemRoot\System32\termsrv.dll).VersionInfo
'{0}.{1}.{2}.{3}' -f $vi.FileMajorPart, $vi.FileMinorPart, $vi.FileBuildPart, $vi.FilePrivatePartStock community rdpwrap.ini often ships:
TerminalServices-RemoteConnectionManager-45344fe7-00e6-4ac6-9f01-d01fd4ffadfb-MaxSessions=2That re-applies Remote Administration’s two-session policy. This package sets it to 0 (unlimited). Without that change, Server hosts often stay capped at 2 RDP sessions even when DefPolicy offsets are correct and RDPConf is green.
| Approach | Pros | Cons |
|---|---|---|
| RDP Wrapper (this repository) | Familiar for labs; no RDS CAL workflow | Unsupported by Microsoft; can break on new termsrv builds |
| RDS-RD-Server | Official multi-user Remote Desktop | Grace period, then RDS CALs + license server |
How do I enable multiple RDP sessions on Windows 10 or Windows 11?
Install this package with Install.bat (Run as administrator), then verify with query user while three users are connected. Consumer Windows editions are not licensed for unlimited concurrent RDP the way Server/RDS is — comply with Microsoft licensing for your scenario.
Why does RDP Wrapper stop working after Windows Update?
Windows Update often replaces termsrv.dll. Offset entries in rdpwrap.ini no longer match, so the wrapper cannot patch Terminal Services correctly. This project’s boot task regenerates offsets after reboot.
RDPConf says fully supported but the 3rd user still disconnects — why?
RDPConf mainly checks whether offsets exist and the wrapper is loaded. Session policy (especially Server MaxSessions=2) can still block concurrent users. Run -Mode Repair -Force, confirm MaxSessions=0, and verify with query user.
How do I fix RDP Wrapper showing [not supported]?
.\scripts\Install-RDPWrapSelfHeal.ps1 -Mode Repair -ForceIf OffsetFinder and the community ini both lack your termsrv build, wait for updated offsets or generate them with symbols, then repair again. See Troubleshooting.
Is RDP Wrapper supported by Microsoft?
No. It modifies Terminal Services behavior and is unsupported. Use at your own risk and ensure licensing compliance. Official multi-user RDP uses Remote Desktop Session Host + RDS CALs.
Do I need internet for OffsetFinder?
Not if local PDB/symbols can produce offsets. Internet is required for the community rdpwrap.ini fallback when the finder fails.
Can I use this with RD Session Host / RDS-RD-Server installed?
No. Do not mix RDP Wrapper with RDS-RD-Server. Uninstall one before using the other. “No Remote Desktop Licence Servers available” is an RDS message, not an RDP Wrapper message.
Does this work on Windows Server 2022 and 2025?
Yes — that is a primary target. Server builds often need the MaxSessions=0 fix in addition to correct offsets. Always prove with query user, not RDPConf alone.
| Problem / search phrase | Fix |
|---|---|
| Third RDP user kicked after 30 seconds | .\scripts\Install-RDPWrapSelfHeal.ps1 -Mode Repair -Force |
RDP Wrapper / RDPConf [not supported] |
Force repair; check logs if OffsetFinder failed |
| RDP broken after Windows Update | Wait for reboot + ~2 min boot task, then force repair |
Antivirus deleted rdpwrap.dll |
Restore from bin\, add exclusion, re-run Install |
| Only 2 RDP sessions on Windows Server | Confirm MaxSessions=0 in rdpwrap.ini, then repair |
| “No Remote Desktop Licence Servers available” | RDS Session Host is installed — remove RDS or configure licensing |
.\scripts\Install-RDPWrapSelfHeal.ps1 -Mode Status
Select-String -Path "$env:ProgramFiles\RDP Wrapper\rdpwrap.ini" -Pattern '45344fe7.*MaxSessions'
tasklist /m rdpwrap.dll
query userInclude:
- Output of
-Mode Status query userwhile reproducingtermsrv.dllFileVersionRaw (not Explorer’s string)- Client vs Server SKU
- Whether RDS Session Host is installed:
Get-WindowsFeature RDS-RD-ServerExtended guide: docs/TROUBLESHOOTING.md
| Version | Focus | Status |
|---|---|---|
| v1.0 | Install / Repair / Status / Uninstall, FileVersionRaw matching, OffsetFinder + community fallback, MaxSessions=0, boot/daily tasks, docs | ✅ Shipped |
| v1.1 | CI syntax checks, release ZIPs, -WhatIf dry-run, Windows Event Log entries |
🔲 Planned |
| v1.2 | -Mode Diagnose JSON export, post-repair notifications, offset contribution helper |
🔲 Planned |
| Later | Winget package, VM-based integration tests | 💭 Ideas |
Track progress in GitHub Issues.
Contributions help more people find and fix broken multi-session RDP installs — especially new termsrv.dll offsets, clearer diagnostics, and documentation improvements.
- Fork BuildWithSubha/RDPWrap-Self-Heal
- Create a branch:
feature/…orfix/… - Keep the change focused (one concern per PR)
- Test on a Windows VM: Install → connect 3 users →
query user - Open a pull request with what changed and how you verified it
git clone https://github.com/BuildWithSubha/RDPWrap-Self-Heal.git
cd RDPWrap-Self-Heal
# Syntax check
powershell -NoProfile -Command "& { $null = [System.Management.Automation.Language.Parser]::ParseFile('scripts\Install-RDPWrapSelfHeal.ps1', [ref]$null, [ref]$errs); if ($errs) { $errs; exit 1 } else { 'OK' } }"
# Read-only health check (if already installed)
.\scripts\Install-RDPWrapSelfHeal.ps1 -Mode StatusIf you confirm a new Windows build:
- Prefer OffsetFinder-generated
[version]+[version-SLInit]blocks - Contribute upstream to sebaxakerhtc/rdpwrap.ini
- Optionally open a PR here to refresh the bundled ini
- Do not commit secrets, credentials, or machine-specific dumps
- Do not submit pirated RDS CALs or licensing circumvention tools
- Match existing PowerShell style; keep diffs small
- Prefer evidence (
query user, FileVersionRaw, Status output) over screenshots alone
Warning
Use at your own risk. RDP Wrapper modifies Terminal Services. Antivirus may flag rdpwrap.dll.
- Enabling concurrent Remote Desktop sessions on editions that do not include that right may violate Microsoft licensing. Compliance is your responsibility.
- Upstream binaries are redistributed for convenience; copyright remains with original authors — see NOTICE and CREDITS.md.
- Cached Microsoft symbols under
tools/OffsetFinder/*/sym/follow Microsoft symbol license terms. Removesym/before publishing if unsure.
Licensed under the Apache License 2.0.
Third-party components keep their own licenses — see NOTICE.
This repository is a packaging and self-heal automation layer built on community work:
| Project | Role |
|---|---|
| stascorp/rdpwrap | Original RDP Wrapper Library |
| sebaxakerhtc/rdpwrap | Modern installer / RDP_CnC |
| sebaxakerhtc/rdpwrap.ini | Community rdpwrap.ini offset database |
| llccd/RDPWrapOffsetFinder | Offset generation for new termsrv.dll builds |
Full attributions: CREDITS.md · Maintainer checklist: docs/PUBLISH.md
Looking for a self-healing RDP Wrapper that survives Windows Update?
If this restored your concurrent Remote Desktop sessions, consider starring the repo.
Report an Issue · Request a Feature · Troubleshooting · Contributing · License




