Compare commits

..

No commits in common. "master" and "v1.6.1" have entirely different histories.

14 changed files with 47 additions and 7601 deletions

5
.gitignore vendored
View File

@ -10,8 +10,3 @@ __history/
*.dcu
*.exe
*.dll
*.msi
# MSI local stuff
*.wixobj
*.wixpdb

152
README.md
View File

@ -1,12 +1,5 @@
# RDP Wrapper Library by Stas'M
[![Telegram](https://img.shields.io/badge/chat-Telegram-blue.svg)](https://t.me/rdpwrap)
![Environment](https://img.shields.io/badge/Windows-Vista,%207,%208,%2010-brightgreen.svg)
[![Release](https://img.shields.io/github/release/stascorp/rdpwrap.svg)](https://github.com/stascorp/rdpwrap/releases)
![License](https://img.shields.io/github/license/stascorp/rdpwrap.svg)
![Downloads](https://img.shields.io/github/downloads/stascorp/rdpwrap/latest/total.svg)
![TotalDownloads](https://img.shields.io/github/downloads/stascorp/rdpwrap/total.svg)
The goal of this project is to enable Remote Desktop Host support and concurrent RDP sessions on reduced functionality systems for home usage.
RDP Wrapper works as a layer between Service Control Manager and Terminal Services, so the original termsrv.dll file remains untouched. Also this method is very strong against Windows Update.
@ -63,15 +56,6 @@ It's recommended to have original termsrv.dll file with the RDP Wrapper installa
- RDPWInst can be used for unattended installation / deployment
- Windows 2000, XP and Server 2003 will not be supported
### Key features:
- RDP host server on any Windows edition beginning from Vista
- Console and remote sessions at the same time
- Using the same user simultaneously for local and remote logon (see configuration app)
- Up to [15 concurrent sessions](https://github.com/stascorp/rdpwrap/issues/192) (the actual limitation depends on your hardware and OS version)
- Console and RDP session shadowing (using [Task Manager in Windows 7](http://cdn.freshdesk.com/data/helpdesk/attachments/production/1009641577/original/remote_control.png?1413476051) and lower, and [Remote Desktop Connection in Windows 8](http://woshub.com/rds-shadow-how-to-connect-to-a-user-session-in-windows-server-2012-r2/) and higher)
- Full [multi-monitor support](https://github.com/stascorp/rdpwrap/issues/163) for RDP host
- ...and if you find a new feature not listed here, [tell us](https://github.com/stascorp/rdpwrap/issues/new) ;)
### Porting to other platforms:
- **ARM** for Windows RT (see links below)
- **IA-64** for Itanium-based Windows Server? *Well, I have no idea* :)
@ -80,7 +64,7 @@ It's recommended to have original termsrv.dll file with the RDP Wrapper installa
- **x86 Delphi version** can be built with *Embarcadero RAD Studio 2010*
- **x86/x64 C++ version** can be built with *Microsoft Visual Studio 2013*
[andrewblock]: http://web.archive.org/web/20150810054558/http://andrewblock.net/enable-remote-desktop-on-windows-8-core/
[andrewblock]: http://andrewblock.net/2013/07/19/enable-remote-desktop-on-windows-8-core/
[mydigitallife]: http://forums.mydigitallife.info/threads/55935-RDP-Wrapper-Library-(works-with-Windows-8-1-Basic)
[xda-dev]: http://forum.xda-developers.com/showthread.php?t=2093525&page=3
[yt-updating]: http://www.youtube.com/watch?v=W9BpbEt1yJw
@ -89,8 +73,6 @@ It's recommended to have original termsrv.dll file with the RDP Wrapper installa
### Links:
- Official GitHub repository:
<br>https://github.com/stascorp/rdpwrap/
- Official Telegram chat:
<br>https://t.me/rdpwrap
- Active discussion in the comments here:
<br>[Enable remote desktop on Windows 8 core / basic - Andrew Block .net][andrewblock]
- MDL Projects and Applications thread here:
@ -100,11 +82,11 @@ It's recommended to have original termsrv.dll file with the RDP Wrapper installa
- Adding «Remote Desktop Users» group:
<br>http://superuser.com/questions/680572/
#### Tutorial videos:
### Tutorial videos:
- [~~Updating RDP Wrapper INI file manually~~][yt-updating] (now use installer to update INI file)
- [How to find offsets for new termsrv.dll versions][yt-offsets]
### Files in release package:
Files in release package:
| File name | Description |
| --------- | ----------- |
@ -129,14 +111,6 @@ There is no definitive answer, see [this discussion](https://github.com/stascorp
Yes, it works in online mode by default. You may disable it by removing `-o` flag in the `install.bat` file.
> What is online install mode?
Online install mode introduced in version 1.6.1. When you installing RDP Wrapper first time using this mode, it will download [latest INI file](https://github.com/stascorp/rdpwrap/blob/master/res/rdpwrap.ini) from GitHub. See [this discussion](https://github.com/stascorp/rdpwrap/issues/132).
> What is INI file and why we need it?
INI file was introduced in version 1.5. It stores system configuration for RDP Wrapper — general wrapping settings, binary patch codes, and per build specific data. When new `termsrv.dll` build comes out, developer adds support for it by updating INI file in repository.
> Config Tool reports version 1.5, but I installed higher version. What's the matter?
Beginning with version 1.5 the `rdpwrap.dll` is not updated anymore, since all settings are stored in INI file. Deal with it.
@ -149,35 +123,7 @@ Make sure you're connected to the Internet and run `update.bat`.
Visit [issues](https://github.com/stascorp/rdpwrap/issues) section, and check whether your `termsrv.dll` build is listed here. If you can't find such issue, create a new — specify your build version for adding to support.
> Why `RDPCheck` doesn't allow to change resolution and other settings?
`RDPCheck` is a very simple application and only for testing purposes. You need to use Microsoft Remote Desktop Client (`mstsc.exe`) if you want to customize the settings. You can use `127.0.0.1` or `127.0.0.2` address for loopback connection.
### Known issues:
- Beginning with Windows 8 **on tablet PCs** inactive sessions will be logged out by system - [more info](https://github.com/stascorp/rdpwrap/issues/37)
- Beginning with Windows 10 you can accidentally lock yourself from PC - [more info](https://github.com/stascorp/rdpwrap/issues/50)
- Beginning with the Creators Update for Windows 10 Home, RDP Wrapper will no longer work, claiming that the listener is `[not listening]` because of `rfxvmt.dll` is missing - [more info](https://github.com/stascorp/rdpwrap/issues/194#issuecomment-323564111), [download links](https://github.com/stascorp/rdpwrap/issues/194#issuecomment-325627235)
- Terminal Service does not start after installing some updates or "Access Denied" issue - [#215](https://github.com/stascorp/rdpwrap/issues/215), [#101](https://github.com/stascorp/rdpwrap/issues/101)
- RDP Wrapper does not work with RemoteFX enabled hosts - [#127](https://github.com/stascorp/rdpwrap/issues/127), [#208](https://github.com/stascorp/rdpwrap/issues/208), [#216](https://github.com/stascorp/rdpwrap/issues/216)
- RDP works, but termsrv.dll crashes on logon attempt - Windows Vista Starter RTM x86 (termsrv.dll `6.0.6000.16386`)
- If Terminal Services hangs at startup, try to add **`rdpwrap.dll`** to antivirus exclusions. Also try to isolate RDP Wrapper from other shared services by the command:
<br>`sc config TermService type= own`
- RDP Wrapper can be removed by AVG Free Antivirus and [Norton Antivirus](https://github.com/stascorp/rdpwrap/issues/191) - first make sure you downloaded [official release](https://github.com/stascorp/rdpwrap/releases) from GitHub, then add it to exclusions.
---
### Change log:
#### 2017.12.27
- Version 1.6.2
- Installer updated
- Include updated INI file for latest Windows builds
- Added check for supported Windows versions ([#155](https://github.com/stascorp/rdpwrap/issues/155))
- Added feature to take INI file from current directory ([#300](https://github.com/stascorp/rdpwrap/issues/300))
- Added feature to restore rfxvmt.dll (missing in Windows 10 Home [#194](https://github.com/stascorp/rdpwrap/issues/194))
- RDP Config updated
- Added feature to allow custom start programs ([#13 (comment)](https://github.com/stascorp/rdpwrap/issues/13#issuecomment-77651843))
- MSI installation package added ([#14](https://github.com/stascorp/rdpwrap/issues/14))
Change log:
#### 2016.08.01
- Version 1.6.1
@ -285,18 +231,11 @@ Visit [issues](https://github.com/stascorp/rdpwrap/issues) section, and check wh
- 6.0.6002.23521 (Windows Vista SP2 with KB3003743 LDR)
- 6.1.X.X (Windows 7 / Server 2008 R2)
- 6.1.7600.16385 (Windows 7)
- 6.1.7600.20890 (Windows 7 with KB2479710)
- 6.1.7600.21316 (Windows 7 with KB2750090)
- 6.1.7601.17514 (Windows 7 SP1)
- 6.1.7601.21650 (Windows 7 SP1 with KB2479710)
- 6.1.7601.21866 (Windows 7 SP1 with KB2647409)
- 6.1.7601.22104 (Windows 7 SP1 with KB2750090)
- 6.1.7601.18540 (Windows 7 SP1 with KB2984972 GDR)
- 6.1.7601.22750 (Windows 7 SP1 with KB2984972 LDR)
- 6.1.7601.18637 (Windows 7 SP1 with KB3003743 GDR)
- 6.1.7601.22843 (Windows 7 SP1 with KB3003743 LDR)
- 6.1.7601.23403 (Windows 7 SP1 with KB3125574)
- 6.1.7601.24234 (Windows 7 SP1 with KB4462923)
- 6.2.8102.0 (Windows 8 Developer Preview)
- 6.2.8250.0 (Windows 8 Consumer Preview)
- 6.2.8400.0 (Windows 8 Release Preview)
@ -307,10 +246,6 @@ Visit [issues](https://github.com/stascorp/rdpwrap/issues) section, and check wh
- 6.3.9600.16384 (Windows 8.1 / Server 2012 R2)
- 6.3.9600.17095 (Windows 8.1 with KB2959626)
- 6.3.9600.17415 (Windows 8.1 with KB3000850)
- 6.3.9600.18692 (Windows 8.1 with KB4022720)
- 6.3.9600.18708 (Windows 8.1 with KB4025335)
- 6.3.9600.18928 (Windows 8.1 with KB4088876)
- 6.3.9600.19093 (Windows 8.1 with KB4343891)
- 6.4.9841.0 (Windows 10 Technical Preview)
- 6.4.9860.0 (Windows 10 Technical Preview Update 1)
- 6.4.9879.0 (Windows 10 Technical Preview Update 2)
@ -318,7 +253,6 @@ Visit [issues](https://github.com/stascorp/rdpwrap/issues) section, and check wh
- 10.0.10041.0 (Windows 10 Pro Technical Preview Update 1)
- 10.0.10240.16384 (Windows 10 RTM)
- 10.0.10586.0 (Windows 10 TH2 Release 151029-1700)
- 10.0.10586.589 (Windows 10 TH2 Release 160906-1759 with KB3185614)
- 10.0.11082.1000 (Windows 10 RS1 Release 151210-2021)
- 10.0.11102.1000 (Windows 10 RS1 Release 160113-1800)
- 10.0.14251.1000 (Windows 10 RS1 Release 160124-1059)
@ -336,78 +270,8 @@ Visit [issues](https://github.com/stascorp/rdpwrap/issues) section, and check wh
- 10.0.14372.0 (Windows 10 RS1 Release 160620-2342)
- 10.0.14379.0 (Windows 10 RS1 Release 160627-1607)
- 10.0.14383.0 (Windows 10 RS1 Release 160701-1839)
- 10.0.14385.0 (Windows 10 RS1 Release 160706-1700)
- 10.0.14388.0 (Windows 10 RS1 Release 160709-1635)
- 10.0.14393.0 (Windows 10 RS1 Release 160715-1616)
- 10.0.14393.1198 (Windows 10 RS1 Release Sec 170427-1353 with KB4019472)
- 10.0.14393.1737 (Windows 10 RS1 Release Inmarket 170914-1249 with KB4041691)
- 10.0.14393.2457 (Windows 10 RS1 Release Inmarket 180822-1743 with KB4343884)
- 10.0.14901.1000 (Windows 10 RS Pre-Release 160805-1700)
- 10.0.14905.1000 (Windows 10 RS Pre-Release 160811-1739)
- 10.0.14915.1000 (Windows 10 RS Pre-Release 160826-1902)
- 10.0.14926.1000 (Windows 10 RS Pre-Release 160910-1529)
- 10.0.14931.1000 (Windows 10 RS Pre-Release 160916-1700)
- 10.0.14936.1000 (Windows 10 RS Pre-Release 160923-1700)
- 10.0.14942.1000 (Windows 10 RS Pre-Release 161003-1929)
- 10.0.14946.1000 (Windows 10 RS Pre-Release 161007-1700)
- 10.0.14951.1000 (Windows 10 RS Pre-Release 161014-1700)
- 10.0.14955.1000 (Windows 10 RS Pre-Release 161020-1700)
- 10.0.14959.1000 (Windows 10 RS Pre-Release 161026-1700)
- 10.0.14965.1001 (Windows 10 RS Pre-Release 161104-1700)
- 10.0.14971.1000 (Windows 10 RS Pre-Release 161111-1700)
- 10.0.14986.1000 (Windows 10 Build 160101.0800)
- 10.0.14997.1001 (Windows 10 Build 160101.0800)
- 10.0.15002.1001 (Windows 10 Build 160101.0800)
- 10.0.15007.1000 (Windows 10 Build 160101.0800)
- 10.0.15014.1000 (Windows 10 Build 160101.0800)
- 10.0.15019.1000 (Windows 10 RS Pre-Release 170121-1513)
- 10.0.15025.1000 (Windows 10 RS Pre-Release 170127-1750)
- 10.0.15031.0 (Windows 10 RS2 Release 170204-1546)
- 10.0.15042.0 (Windows 10 RS2 Release 170219-2329)
- 10.0.15046.0 (Windows 10 Build 160101.0800)
- 10.0.15048.0 (Windows 10 Build 160101.0800)
- 10.0.15055.0 (Windows 10 Build 160101.0800)
- 10.0.15058.0 (Windows 10 Build 160101.0800)
- 10.0.15061.0 (Windows 10 Build 160101.0800)
- 10.0.15063.0 (Windows 10 Build 160101.0800)
- 10.0.15063.296 (Windows 10 Build 160101.0800)
- 10.0.15063.994 (Windows 10 Build 160101.0800)
- 10.0.15063.1155 (Windows 10 Build 160101.0800)
- 10.0.16179.1000 (Windows 10 Build 160101.0800)
- 10.0.16184.1001 (Windows 10 Build 160101.0800)
- 10.0.16199.1000 (Windows 10 Build 160101.0800)
- 10.0.16215.1000 (Windows 10 Build 160101.0800)
- 10.0.16232.1000 (Windows 10 Build 160101.0800)
- 10.0.16237.1001 (Windows 10 Build 160101.0800)
- 10.0.16241.1001 (Windows 10 Build 160101.0800)
- 10.0.16251.0 (Windows 10 Build 160101.0800)
- 10.0.16251.1000 (Windows 10 Build 160101.0800)
- 10.0.16257.1 (Windows 10 Build 160101.0800)
- 10.0.16257.1000 (Windows 10 Build 160101.0800)
- 10.0.16273.1000 (Windows 10 Build 160101.0800)
- 10.0.16275.1000 (Windows 10 Build 160101.0800)
- 10.0.16278.1000 (Windows 10 Build 160101.0800)
- 10.0.16281.1000 (Windows 10 Build 160101.0800)
- 10.0.16288.1 (Windows 10 Build 160101.0800)
- 10.0.16291.0 (Windows 10 Build 160101.0800)
- 10.0.16294.1 (Windows 10 Build 160101.0800)
- 10.0.16296.0 (Windows 10 Build 160101.0800)
- 10.0.16299.0 (Windows 10 Build 160101.0800)
- 10.0.16299.15 (Windows 10 Build 160101.0800)
- 10.0.16353.1000 (Windows 10 Build 160101.0800)
- 10.0.16362.1000 (Windows 10 Build 160101.0800)
- 10.0.17004.1000 (Windows 10 Build 160101.0800)
- 10.0.17017.1000 (Windows 10 Build 160101.0800)
- 10.0.17025.1000 (Windows 10 Build 160101.0800)
- 10.0.17035.1000 (Windows 10 Build 160101.0800)
- 10.0.17046.1000 (Windows 10 Build 160101.0800)
- 10.0.17063.1000 (Windows 10 Build 160101.0800)
- 10.0.17115.1 (Windows 10 Build 160101.0800)
- 10.0.17128.1 (Windows 10 Build 160101.0800)
- 10.0.17133.1 (Windows 10 Build 160101.0800)
- 10.0.17134.1 (Windows 10 Build 160101.0800)
- 10.0.17723.1000 (Windows 10 Build 160101.0800)
- 10.0.17763.1 (Windows 10 Build 160101.0800)
#### Confirmed working on:
- Windows Vista Starter (x86 - Service Pack 1 and higher)
@ -448,6 +312,14 @@ Visit [issues](https://github.com/stascorp/rdpwrap/issues) section, and check wh
- Windows 10 Enterprise
- Windows Server 2016 Technical Preview
#### Known issues:
- Beginning with Windows 8 **on tablet PCs** inactive sessions will be logged out by system - [more info](https://github.com/stascorp/rdpwrap/issues/37)
- Beginning with Windows 10 you can accidentally lock yourself from PC - [more info](https://github.com/stascorp/rdpwrap/issues/50)
- RDP works, but termsrv.dll crashes on logon attempt - Windows Vista Starter RTM x86 (termsrv.dll `6.0.6000.16386`)
- If Terminal Services hangs at startup, try to add **`rdpwrap.dll`** to antivirus exclusions. Also try to isolate RDP Wrapper from other shared services by the command:
<br>`sc config TermService type= own`
- RDP Wrapper Installer can be removed by AVG Free Antivirus after reboot - add it to exclusions.
Installation instructions:
- Download latest release binaries and unpack files
- Right-click on **`install.bat`** and select Run as Administrator

View File

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductName="RDP Wrapper Library" ?>
<?define ProductVersion="1.6.2" ?>
<?define ProductCode="37ea5771-3352-4a52-9fac-9297331daebd"?>
<?define UpgradeCode="6623f60c-e84f-41e7-a55b-f421165deeb5"?>
<?define Manufacturer="Stas'M Corp. and contributors"?>
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes"/>
<Property Id="MSIFASTINSTALL" Value="1" />
<Property Id="DISABLEROLLBACK" Value="1" />
<MajorUpgrade AllowDowngrades="yes"/>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="CommonAppDataFolder">
<Directory Id="PACKAGECACHE" Name="Package Cache">
<Directory Id="INSTALLLOCATION" Name="{$(var.ProductCode)}">
<Component Id="RDPWrap" Guid="affd77d1-b35c-46f3-a97f-1686dc57b8b8">
<File Id='RDPWInst' DiskId='1' Source='RDPWInst.exe'/>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id="RDPWrapInstall" Title="RDPWrapSetup" Level="1">
<ComponentRef Id="RDPWrap" />
</Feature>
<CustomAction Id='InstallAction' FileKey='RDPWInst' ExeCommand='-i -o' Execute='immediate' Return='check'/>
<CustomAction Id='UninstallAction' FileKey='RDPWInst' ExeCommand='-u' Execute='immediate' Return='check'/>
<CustomAction Id='UpdateAction' FileKey='RDPWInst' ExeCommand='-w' Execute='immediate' Return='check'/>
<!-- <CustomAction Id='ChangeAction' Directory='ProgramFilesFolder' ExeCommand='RDP Wrapper\RDPConf' Execute='immediate' Return='check'/>
<CustomAction Id='RepairAction' Directory='ProgramFilesFolder' ExeCommand='RDP Wrapper\RDPCheck' Execute='immediate' Return='check'/> -->
<InstallExecuteSequence>
<Custom Action='InstallAction' After='InstallFinalize'>NOT Installed AND NOT WIX_UPGRADE_DETECTED</Custom>
<Custom Action='UninstallAction' Before="RemoveFiles">REMOVE AND NOT UPGRADINGPRODUCTCODE</Custom>
<Custom Action='UpdateAction' Before="RemoveFiles">UPGRADINGPRODUCTCODE</Custom>
<!-- <Custom Action='ChangeAction' After='InstallFinalize'>Installed AND NOT REINSTALL AND NOT UPGRADINGPRODUCTCODE AND NOT REMOVE</Custom>
<Custom Action='RepairAction' After='InstallFinalize'>REINSTALL</Custom> -->
</InstallExecuteSequence>
</Product>
</Wix>

View File

@ -1,3 +0,0 @@
@echo off
"%ProgramFiles%\WiX Toolset v3.11\bin\candle" RDPWInst.wxs
"%ProgramFiles%\WiX Toolset v3.11\bin\light" RDPWInst.wixobj

View File

@ -50,7 +50,6 @@ if not !errorlevel!==0 (
echo [*] Setting firewall configuration...
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=tcp localport=3389 profile=any action=allow
netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=udp localport=3389 profile=any action=allow
echo [*] Looking for TermService PID...
tasklist /SVC /FI "SERVICES eq TermService" | find "PID" /V
echo.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
{
Copyright 2018 Stas'M Corp.
Copyright 2016 Stas'M Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -26,9 +26,7 @@ uses
Classes,
WinSvc,
Registry,
WinInet,
AccCtrl,
AclAPI;
WinInet;
function EnumServicesStatusEx(
hSCManager: SC_HANDLE;
@ -43,11 +41,6 @@ function EnumServicesStatusEx(
pszGroupName: PWideChar): BOOL; stdcall;
external advapi32 name 'EnumServicesStatusExW';
function ConvertStringSidToSid(
StringSid: PWideChar;
var Sid: PSID): BOOL; stdcall;
external advapi32 name 'ConvertStringSidToSidW';
type
FILE_VERSION = record
Version: record case Boolean of
@ -646,57 +639,14 @@ begin
Result := True;
end;
procedure GrantSidFullAccess(Path, SID: String);
var
p_SID: PSID;
pDACL: PACL;
EA: EXPLICIT_ACCESS;
Code, Result: DWORD;
begin
p_SID := nil;
if not ConvertStringSidToSid(PChar(SID), p_SID) then
begin
Code := GetLastError;
Writeln('[-] ConvertStringSidToSid error (code ', Code, ').');
Exit;
end;
EA.grfAccessPermissions := GENERIC_ALL;
EA.grfAccessMode := GRANT_ACCESS;
EA.grfInheritance := SUB_CONTAINERS_AND_OBJECTS_INHERIT;
EA.Trustee.pMultipleTrustee := nil;
EA.Trustee.MultipleTrusteeOperation := NO_MULTIPLE_TRUSTEE;
EA.Trustee.TrusteeForm := TRUSTEE_IS_SID;
EA.Trustee.TrusteeType := TRUSTEE_IS_WELL_KNOWN_GROUP;
EA.Trustee.ptstrName := p_SID;
Result := SetEntriesInAcl(1, @EA, nil, pDACL);
if Result = ERROR_SUCCESS then
begin
if SetNamedSecurityInfo(pchar(Path), SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, nil, nil, pDACL, nil) <> ERROR_SUCCESS then
begin
Code := GetLastError;
Writeln('[-] SetNamedSecurityInfo error (code ', Code, ').');
end;
LocalFree(Cardinal(pDACL));
end
else begin
Code := GetLastError;
Writeln('[-] SetEntriesInAcl error (code ', Code, ').');
end;
end;
procedure ExtractFiles;
var
RDPClipRes, RfxvmtRes, S: String;
RDPClipRes, S: String;
OnlineINI: TStringList;
begin
if not DirectoryExists(ExtractFilePath(ExpandPath(WrapPath))) then
if ForceDirectories(ExtractFilePath(ExpandPath(WrapPath))) then begin
S := ExtractFilePath(ExpandPath(WrapPath));
Writeln('[+] Folder created: ', S);
GrantSidFullAccess(S, 'S-1-5-18'); // Local System account
GrantSidFullAccess(S, 'S-1-5-6'); // Service group
end
if ForceDirectories(ExtractFilePath(ExpandPath(WrapPath))) then
Writeln('[+] Folder created: ', ExtractFilePath(ExpandPath(WrapPath)))
else begin
Writeln('[-] ForceDirectories error.');
Writeln('[*] Path: ', ExtractFilePath(ExpandPath(WrapPath)));
@ -720,22 +670,9 @@ begin
OnlineINI.Free;
end;
if not Online then
begin
S := ExtractFilePath(ParamStr(0)) + 'rdpwrap.ini';
if FileExists(S) then
begin
OnlineINI := TStringList.Create;
OnlineINI.LoadFromFile(S);
S := ExtractFilePath(ExpandPath(WrapPath)) + 'rdpwrap.ini';
OnlineINI.SaveToFile(S);
Writeln('[+] Current INI file -> ', S);
OnlineINI.Free;
end else
ExtractRes('config', ExtractFilePath(ExpandPath(WrapPath)) + 'rdpwrap.ini');
end;
ExtractRes('config', ExtractFilePath(ExpandPath(WrapPath)) + 'rdpwrap.ini');
RDPClipRes := '';
RfxvmtRes := '';
case Arch of
32: begin
ExtractRes('rdpw32', ExpandPath(WrapPath));
@ -743,8 +680,6 @@ begin
RDPClipRes := 'rdpclip6032';
if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 1) then
RDPClipRes := 'rdpclip6132';
if (FV.Version.w.Major = 10) and (FV.Version.w.Minor = 0) then
RfxvmtRes := 'rfxvmt32';
end;
64: begin
ExtractRes('rdpw64', ExpandPath(WrapPath));
@ -752,16 +687,11 @@ begin
RDPClipRes := 'rdpclip6064';
if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 1) then
RDPClipRes := 'rdpclip6164';
if (FV.Version.w.Major = 10) and (FV.Version.w.Minor = 0) then
RfxvmtRes := 'rfxvmt64';
end;
end;
if RDPClipRes <> '' then
if not FileExists(ExpandPath('%SystemRoot%\System32\rdpclip.exe')) then
ExtractRes(RDPClipRes, ExpandPath('%SystemRoot%\System32\rdpclip.exe'));
if RfxvmtRes <> '' then
if not FileExists(ExpandPath('%SystemRoot%\System32\rfxvmt.dll')) then
ExtractRes(RfxvmtRes, ExpandPath('%SystemRoot%\System32\rfxvmt.dll'));
end;
procedure DeleteFiles;
@ -1028,10 +958,8 @@ end;
procedure TSConfigFirewall(Enable: Boolean);
begin
if Enable then
begin
ExecWait('netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=tcp localport=3389 profile=any action=allow');
ExecWait('netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=udp localport=3389 profile=any action=allow');
end else
ExecWait('netsh advfirewall firewall add rule name="Remote Desktop" dir=in protocol=tcp localport=3389 profile=any action=allow')
else
ExecWait('netsh advfirewall firewall delete rule name="Remote Desktop"');
end;
@ -1129,9 +1057,9 @@ end;
var
I: Integer;
begin
Writeln('RDP Wrapper Library v1.6.2');
Writeln('Installer v2.6');
Writeln('Copyright (C) Stas''M Corp. 2018');
Writeln('RDP Wrapper Library v1.6');
Writeln('Installer v2.3');
Writeln('Copyright (C) Stas''M Corp. 2016');
Writeln('');
if (ParamCount < 1)
@ -1163,13 +1091,6 @@ begin
Exit;
end;
if not CheckWin32Version(6,0) then
begin
Writeln('[-] Unsupported Windows version:');
Writeln(' only >= 6.0 (Vista, Server 2008 and newer) are supported.');
Exit;
end;
if not SupportedArchitecture then
begin
Writeln('[-] Unsupported processor architecture.');

Binary file not shown.

View File

@ -222,15 +222,6 @@ object MainForm: TMainForm
Value = 0
OnChange = seRDPPortChange
end
object cbCustomPrg: TCheckBox
Left = 8
Top = 115
Width = 169
Height = 17
Caption = 'Allow to start custom programs'
TabOrder = 4
OnClick = cbAllowTSConnectionsClick
end
end
object Timer: TTimer
Interval = 250

View File

@ -1,5 +1,5 @@
{
Copyright 2017 Stas'M Corp.
Copyright 2016 Stas'M Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -49,7 +49,6 @@ type
lsSuppVer: TLabel;
cbHideUsers: TCheckBox;
gbGeneral: TGroupBox;
cbCustomPrg: TCheckBox;
procedure FormCreate(Sender: TObject);
procedure cbAllowTSConnectionsClick(Sender: TObject);
procedure seRDPPortChange(Sender: TObject);
@ -374,11 +373,6 @@ begin
cbSingleSessionPerUser.Checked := Reg.ReadBool('fSingleSessionPerUser');
except
end;
try
cbCustomPrg.Checked := Reg.ReadBool('HonorLegacySettings');
except
end;
Reg.CloseKey;
@ -437,11 +431,6 @@ begin
Reg.WriteBool('fSingleSessionPerUser', cbSingleSessionPerUser.Checked);
except
end;
try
Reg.WriteBool('HonorLegacySettings', cbCustomPrg.Checked);
except
end;
Reg.CloseKey;

Binary file not shown.

View File

@ -127,12 +127,7 @@ DWORD INI_FILE::GetFileStringFromNum(DWORD StringNumber, char *RetString, DWORD
for (DWORD i = FileStringsMap[StringNumber]; i < FileSize; i++)
{
if (i == (FileSize - 1))
{
EndStringPos = FileSize;
break;
}
if (FileRaw[i] == '\r' && FileRaw[i + 1] == '\n')
if ((FileRaw[i] == '\r' && FileRaw[i + 1] == '\n') || i == (FileSize - 1))
{
EndStringPos = i;
break;

View File

@ -26,14 +26,14 @@ Terminal Services supported versions
6.1.7600.20661 (Windows 7 with KB951422) [todo]
6.1.7600.21085 (Windows 7 with KB951422 v2) [todo]
6.1.7600.20621 (Windows 7 with KB979470) [todo]
6.1.7600.20890 (Windows 7 with KB2479710) [policy hook + extended patch]
6.1.7600.21316 (Windows 7 with KB2750090) [policy hook + extended patch]
6.1.7600.20890 (Windows 7 with KB2479710) [todo]
6.1.7600.21316 (Windows 7 with KB2750090) [todo]
6.1.7600.21420 (Windows 7 with KB2800789) [todo]
6.1.7601.17514 (Windows 7 SP1) [policy hook + extended patch]
6.1.7601.21855 (Windows 7 SP1 with KB951422 v2) [todo]
6.1.7601.21650 (Windows 7 SP1 with KB2479710) [policy hook + extended patch]
6.1.7601.21866 (Windows 7 SP1 with KB2647409) [policy hook + extended patch]
6.1.7601.22104 (Windows 7 SP1 with KB2750090) [policy hook + extended patch]
6.1.7601.21650 (Windows 7 SP1 with KB2479710) [todo]
6.1.7601.21866 (Windows 7 SP1 with KB2647409) [todo]
6.1.7601.22104 (Windows 7 SP1 with KB2750090) [todo]
6.1.7601.22213 (Windows 7 SP1 with KB2800789) [todo]
6.1.7601.22476 (Windows 7 SP1 with KB2870165) [todo]
6.1.7601.22435 (Windows 7 SP1 with KB2878424) [todo]
@ -42,8 +42,6 @@ Terminal Services supported versions
6.1.7601.22750 (Windows 7 SP1 with KB2984972 LDR) [policy hook + extended patch]
6.1.7601.18637 (Windows 7 SP1 with KB3003743 GDR) [policy hook + extended patch]
6.1.7601.22843 (Windows 7 SP1 with KB3003743 LDR) [policy hook + extended patch]
6.1.7601.23403 (Windows 7 SP1 with KB3125574) [policy hook + extended patch]
6.1.7601.24234 (Windows 7 SP1 with KB4462923) [policy hook + extended patch]
6.2.8102.0 (Windows 8 Developer Preview) [policy hook + extended patch]
6.2.8250.0 (Windows 8 Consumer Preview) [policy hook + extended patch]
6.2.8400.0 (Windows 8 Release Preview) [policy hook + extended patch]
@ -54,10 +52,6 @@ Terminal Services supported versions
6.3.9600.16384 (Windows 8.1) [init hook + extended patch]
6.3.9600.17095 (Windows 8.1 with KB2959626) [init hook + extended patch]
6.3.9600.17415 (Windows 8.1 with KB3000850) [init hook + extended patch]
6.3.9600.18692 (Windows 8.1 with KB4022720) [init hook + extended patch]
6.3.9600.18708 (Windows 8.1 with KB4025335) [init hook + extended patch]
6.3.9600.18928 (Windows 8.1 with KB4088876) [init hook + extended patch]
6.3.9600.19093 (Windows 8.1 with KB4343891) [init hook + extended patch]
6.4.9841.0 (Windows 10 Technical Preview) [init hook + extended patch]
6.4.9860.0 (Windows 10 Technical Preview UP1) [init hook + extended patch]
6.4.9879.0 (Windows 10 Technical Preview UP2) [init hook + extended patch]
@ -70,7 +64,6 @@ Terminal Services supported versions
10.0.10532.0 (Windows 10 th2_release.150822-1406) [todo]
10.0.10547.0 (Windows 10 th2_release.150913-1511) [todo]
10.0.10586.0 (Windows 10 th2_release.151029-1700) [init hook + extended patch]
10.0.10586.589 (Windows 10 th2_release.160906-1759) [init hook + extended patch]
10.0.11082.1000 (Windows 10 rs1_release.151210-2021) [init hook + extended patch]
10.0.11102.1000 (Windows 10 rs1_release.160113-1800) [init hook + extended patch]
10.0.14251.1000 (Windows 10 rs1_release.160124-1059) [init hook + extended patch]
@ -88,256 +81,11 @@ Terminal Services supported versions
10.0.14372.0 (Windows 10 rs1_release.160620-2342) [init hook + extended patch]
10.0.14379.0 (Windows 10 rs1_release.160627-1607) [init hook + extended patch]
10.0.14383.0 (Windows 10 rs1_release.160701-1839) [init hook + extended patch]
10.0.14385.0 (Windows 10 rs1_release.160706-1700) [init hook + extended patch]
10.0.14388.0 (Windows 10 rs1_release.160709-1635) [init hook + extended patch]
10.0.14393.0 (Windows 10 rs1_release.160715-1616) [init hook + extended patch]
10.0.14393.1198 (Windows 10 rs1_release_sec.170427-1353) [init hook + extended patch]
10.0.14393.1737 (Windows 10 rs1_release_inmarket.170914-1249) [init hook + extended patch]
10.0.14393.2457 (Windows 10 rs1_release_inmarket.180822-1743) [init hook + extended patch]
10.0.14901.1000 (Windows 10 rs_prerelease.160805-1700) [init hook + extended patch]
10.0.14905.1000 (Windows 10 rs_prerelease.160811-1739) [init hook + extended patch]
10.0.14915.1000 (Windows 10 rs_prerelease.160826-1902) [init hook + extended patch]
10.0.14926.1000 (Windows 10 rs_prerelease.160910-1529) [init hook + extended patch]
10.0.14931.1000 (Windows 10 rs_prerelease.160916-1700) [init hook + extended patch]
10.0.14936.1000 (Windows 10 rs_prerelease.160923-1700) [init hook + extended patch]
10.0.14942.1000 (Windows 10 rs_prerelease.161003-1929) [init hook + extended patch]
10.0.14946.1000 (Windows 10 rs_prerelease.161007-1700) [init hook + extended patch]
10.0.14951.1000 (Windows 10 rs_prerelease.161014-1700) [init hook + extended patch]
10.0.14955.1000 (Windows 10 rs_prerelease.161020-1700) [init hook + extended patch]
10.0.14959.1000 (Windows 10 rs_prerelease.161026-1700) [init hook + extended patch]
10.0.14965.1001 (Windows 10 rs_prerelease.161104-1700) [init hook + extended patch]
10.0.14971.1000 (Windows 10 rs_prerelease.161111-1700) [init hook + extended patch]
10.0.14986.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.14997.1001 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15002.1001 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15007.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15014.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15019.1000 (Windows 10 rs_prerelease.170121-1513) [init hook + extended patch]
10.0.15025.1000 (Windows 10 rs_prerelease.170127-1750) [init hook + extended patch]
10.0.15031.0 (Windows 10 rs2_release.170204-1546) [init hook + extended patch]
10.0.15042.0 (Windows 10 rs2_release.170219-2329) [init hook + extended patch]
10.0.15046.0 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15048.0 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15055.0 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15058.0 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15061.0 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15063.0 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15063.296 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15063.994 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.15063.1155 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16179.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16184.1001 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16199.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16215.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16232.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16237.1001 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16241.1001 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16251.0 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16251.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16257.1 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16257.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16273.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16275.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16278.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16281.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16288.1 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16291.0 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16294.1 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16296.0 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16299.0 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16299.15 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16353.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.16362.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17004.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17017.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17025.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17035.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17040.1000 (Windows 10 WinBuild.160101.0800) [todo]
10.0.17046.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17063.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17074.1002 (Windows 10 WinBuild.160101.0800) [todo]
10.0.17083.1000 (Windows 10 WinBuild.160101.0800) [todo]
10.0.17115.1 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17128.1 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17133.1 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17134.1 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17723.1000 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
10.0.17763.1 (Windows 10 WinBuild.160101.0800) [init hook + extended patch]
Source code changelog (rdpwrap library):
2018.10.10 :
- added support for termsrv.dll 6.1.7601.24234 x86
2018.10.04 :
- added support for termsrv.dll 10.0.14393.2457 x86
2018.10.03 :
- added support for termsrv.dll 6.1.7601.24234 x64
- added support for termsrv.dll 10.0.15063.994 x64
- added support for termsrv.dll 10.0.17723.1000 x64
- added support for termsrv.dll 10.0.17763.1
2018.09.10 :
- added support for termsrv.dll 6.1.7600.20890
- added support for termsrv.dll 6.1.7600.21316
- added support for termsrv.dll 6.1.7601.21650
- added support for termsrv.dll 6.1.7601.21866
- added support for termsrv.dll 6.1.7601.22104
- added support for termsrv.dll 6.3.9600.19093
- added support for termsrv.dll 10.0.14393.2457 x64
- added support for termsrv.dll 10.0.15063.1155 x64
2018.05.16 :
- added support for termsrv.dll 10.0.17115.1
- added support for termsrv.dll 10.0.17128.1
- added support for termsrv.dll 10.0.17133.1
- added support for termsrv.dll 10.0.17134.1
2018.03.26 :
- added support for termsrv.dll 6.3.9600.18928 by 1nd1g0
2017.12.27 :
- added support for termsrv.dll 10.0.17017.1000
- added support for termsrv.dll 10.0.17025.1000
- added support for termsrv.dll 10.0.17035.1000
- added support for termsrv.dll 10.0.17046.1000
- added support for termsrv.dll 10.0.17063.1000
2017.10.13 :
- added support for termsrv.dll 10.0.14393.1737
- added support for termsrv.dll 10.0.16299.0
- added support for termsrv.dll 10.0.16299.15
- added support for termsrv.dll 10.0.17004.1000
2017.09.24 :
- added support for termsrv.dll 10.0.16291.0
- added support for termsrv.dll 10.0.16294.1
- added support for termsrv.dll 10.0.16296.0
- added support for termsrv.dll 10.0.16362.1000
2017.09.15 :
- added support for termsrv.dll 10.0.16288.1
2017.09.06 :
- added support for termsrv.dll 10.0.16273.1000
- added support for termsrv.dll 10.0.16275.1000
- added support for termsrv.dll 10.0.16278.1000
- added support for termsrv.dll 10.0.16281.1000
- added support for termsrv.dll 10.0.16353.1000
2017.08.04 :
- added support for termsrv.dll 10.0.16257.1
- added support for termsrv.dll 10.0.16257.1000
2017.07.30 :
- added support for termsrv.dll 6.3.9600.18708
- added support for termsrv.dll 10.0.16232.1000
- added support for termsrv.dll 10.0.16237.1001
- added support for termsrv.dll 10.0.16241.1001
- added support for termsrv.dll 10.0.16251.0
- added support for termsrv.dll 10.0.16251.1000
2017.06.29 :
- added support for termsrv.dll 6.3.9600.18692
2017.06.10 :
- added support for termsrv.dll 10.0.15063.296
- added support for termsrv.dll 10.0.16215.1000
2017.05.29 :
- added support for termsrv.dll 10.0.16199.1000
2017.05.17 :
- added support for termsrv.dll 10.0.14997.1001 x64
2017.05.12 :
- added support for termsrv.dll 10.0.14393.1198 x86
2017.05.03 :
- added support for termsrv.dll 10.0.16179.1000
- added support for termsrv.dll 10.0.16184.1001
2017.03.22 :
- added support for termsrv.dll 10.0.15063.0
2017.03.21 :
- added support for termsrv.dll 10.0.15061.0
2017.03.16 :
- added support for termsrv.dll 10.0.15058.0
2017.03.14 :
- added support for termsrv.dll 10.0.15055.0
2017.03.05 :
- added support for termsrv.dll 10.0.15048.0
2017.03.02 :
- added support for termsrv.dll 10.0.15046.0
2017.03.01 :
- added support for termsrv.dll 10.0.15031.0
- added support for termsrv.dll 10.0.15042.0
2017.02.03 :
- added support for termsrv.dll 10.0.15025.1000 x64
2017.01.28 :
- added support for termsrv.dll 10.0.15019.1000
2017.01.21 :
- added support for termsrv.dll 10.0.15014.1000
2017.01.15 :
- added support for termsrv.dll 10.0.15007.1000
2017.01.12 :
- added support for termsrv.dll 10.0.15002.1001
2016.12.23 :
- added support for termsrv.dll 10.0.14986.1000
2016.11.19 :
- added support for termsrv.dll 10.0.14959.1000
- added support for termsrv.dll 10.0.14965.1001
- added support for termsrv.dll 10.0.14971.1000
2016.10.28 :
- added support for termsrv.dll 10.0.14955.1000
2016.10.21 :
- added support for termsrv.dll 10.0.14951.1000
2016.10.19 :
- added support for termsrv.dll 10.0.14946.1000
2016.10.08 :
- added support for termsrv.dll 10.0.14942.1000
2016.09.30 :
- added support for termsrv.dll 10.0.14936.1000
2016.09.27 :
- added support for termsrv.dll 10.0.14931.1000
2016.09.15 :
- added support for termsrv.dll 10.0.14926.1000
2016.09.14 :
- added support for termsrv.dll 10.0.10586.589
2016.09.03 :
- added support for termsrv.dll 10.0.14915.1000
2016.08.28 :
- added support for termsrv.dll 6.1.7601.23403
- added support for termsrv.dll 10.0.14901.1000
- added support for termsrv.dll 10.0.14905.1000
2016.08.12 :
- added support for termsrv.dll 10.0.14385.0
2016.08.01 :
- preparing the release