RDP Wrapper

repository·master·Indexed 12 days ago

https://github.com/stascorp/rdpwrap

A library that enables Remote Desktop Host support and concurrent RDP sessions on Windows editions that typically lack these features, such as Home editions. It acts as a layer between the Service Control Manager and Terminal Services, allowing the original termsrv.dll to remain untouched. Includes tools like RDPWInst.exe for installation, RDPCheck.exe for verification, and RDPConf.exe for configuration.

Tokens
1.5K
Snippets
6
Records
11
Agent score
90%

What's inside RDP Wrapper

  1. Build the RDPWrap DLL project

    master

    The RDPWrap project is a VC++ project defined by RDPWrap.vcxproj. The core logic resides in RDPWrap.cpp.

    Important Note on Symbol Exporting: By default, this DLL does not export symbols, which means a .lib file is not generated during the build process.

    If you need to create a dependency on this project or require an export library, you must either:

    1. Add code to the source to explicitly export symbols from the DLL.
    2. Set the Skip Import Library property to Yes in the Linker -> General section of the Project Property Pages.
    // To enable LIB generation, you must export symbols:
    extern "C" __declspec(dllexport) void MyFunction();
  2. Update the RDP Wrapper INI file

    master

    The rdpwrap.ini file stores system configuration, binary patch codes, and per-build specific data. When your Windows termsrv.dll is updated, you may need to update the INI file to maintain support.

    To update the INI file:

    1. Right-click on update.bat in your RDP Wrapper directory.
    2. Select Run as Administrator.
    3. Check the command output for the results.
  3. Install RDP Wrapper

    master

    To enable Remote Desktop Host support and concurrent RDP sessions on your Windows system, follow these steps:

    1. Download the latest release binaries from the GitHub Releases section.
    2. Unpack the downloaded files.
    3. Locate install.bat in the extracted folder.
    4. Right-click on install.bat and select Run as Administrator.
    5. Monitor the command output for installation details.

    Note: By default, the installer operates in online mode, meaning it will attempt to download the latest rdpwrap.ini file from GitHub during installation. To disable this, remove the -o flag from the install.bat file.

    :: Example of how to modify install.bat for offline mode
    rdpwrap.exe -i
    :: Change to:
    rdpwrap.exe -i -o (remove -o to disable online mode)
  4. Update RDP Wrapper components using update.bat

    master

    The update.bat script is a utility used to refresh RDP Wrapper components and configuration. It attempts to run the RDPWInst.exe installer with the -w flag.

    Prerequisites:

    • The RDPWInst.exe executable must exist in the same directory as the script.
    • If the executable is missing, ensure you have extracted all files from the downloaded package and that your anti-virus software has not quarantined the file.
    update.bat
  5. Uninstall RDP Wrapper using uninstall.bat

    master

    To remove the RDP Wrapper service from your system, run the uninstall.bat script located in the bin directory of the RDP Wrapper package. This script invokes the installer executable with the -u flag to perform the uninstallation.

    Prerequisites:

    • The RDPWInst.exe executable must be present in the same directory as the batch file.
    • If the script fails with an error stating the installer is not found, ensure you have extracted all files from the downloaded package and check if your anti-virus software has quarantined RDPWInst.exe.
    bin\uninstall.bat
  6. Install RDP Wrapper using install.bat

    master

    To install the RDP Wrapper service, run the install.bat script located in the bin directory. This script executes the RDPWInst.exe installer with specific flags to perform the installation and cleanup.

    Prerequisites:

    • Ensure RDPWInst.exe is present in the same directory as the batch file.
    • If the installer is not found, ensure you have extracted all files from the downloaded package and check if an anti-virus software has quarantined the executable.
    install.bat
  7. Troubleshoot RDP Wrapper issues

    master

    Common Issues and Solutions

    1. Config Tool shows [not supported]

    • Ensure you are connected to the Internet and run update.bat.
    • If it still shows [not supported], check the GitHub Issues to see if your specific termsrv.dll build is listed. If not, you may need to create an issue to add support for your build.

    2. Terminal Services fails to start or 'Access Denied'

    • This can happen after certain Windows updates.

    3. Terminal Services hangs at startup

    • Try adding rdpwrap.dll to your antivirus exclusions.
    • Try isolating the service by running the following command: sc config TermService type= own

    4. Antivirus interference

    • Some antivirus software (like AVG Free or Norton) may remove RDP Wrapper. Ensure you have downloaded the official release and add the files to your antivirus exclusions.
  8. Verify RDP functionality with RDPCheck

    master

    The RDPCheck.exe utility is a simple tool used to verify if RDP is working correctly on your machine.

    Limitations:

    • RDPCheck is for testing purposes only and does not allow you to change resolution or other advanced settings.
    • To use advanced RDP settings, use the standard Microsoft Remote Desktop Client (mstsc.exe).
    • When testing locally via mstsc.exe, you can use the loopback addresses 127.0.0.1 or 127.0.0.2.
  9. Reference: RDP Wrapper Release Package Files

    master

    The following files are included in the official release package:

    File nameDescription
    RDPWInst.exeRDP Wrapper Library installer/uninstaller
    RDPCheck.exeLocal RDP Checker (verifies if RDP is working)
    RDPConf.exeRDP Wrapper Configuration tool
    install.batQuick install batch file
    uninstall.batQuick uninstall batch file
    update.batQuick update batch file
  10. Use RDPWInst.exe flags for installation

    master

    The install.bat script wraps the RDPWInst.exe command-line tool. When called by the installer, it uses the following flags:

    • -i: Install the RDP Wrapper service.
    • -o: Remove/clean up existing RDP Wrapper components before or during the process.

    Note: These flags are used internally by install.bat to ensure a clean installation state.

    RDPWInst.exe -i -o