79 Commits
v1.5 ... v1.6.1

Author SHA1 Message Date
e45fde37c2 Pre-release updates 2016-08-01 16:32:00 +03:00
1254ac3b3b README: Quick fixes 2016-07-24 01:21:30 +03:00
0e9385490b README: Replace HTML with Markdown 2016-07-24 01:11:25 +03:00
3edd0e5300 RDPConf: Add feature to hide users on logon 2016-07-23 22:08:44 +03:00
2d482b29be RDPConf: Update firewall rule on port change (fix #86) 2016-07-23 19:56:58 +03:00
11be8c6833 Installer: Allow to keep settings on uninstall (fix #106) 2016-07-23 19:33:35 +03:00
64e0987053 Installer: Add online install mode 2016-07-23 19:27:33 +03:00
558925a865 INI: Add support for new builds (fix #130)
10.0.14393.0 x86/x64
2016-07-22 21:15:53 +03:00
1395ea22bb INI: Add support for new builds (fix #128)
10.0.14383.0 x86/x64
10.0.14388.0 x86/x64
2016-07-15 21:55:02 +03:00
92bc50b6db INI: Add support for new builds (fix #126)
10.0.14379.0 x86/x64
2016-07-06 21:26:53 +03:00
f6b125331e INI: Add support for new builds
10.0.14372.0 x86/x64
2016-06-27 09:44:49 +03:00
87e6e00b1b Merge pull request #125 from kbmorris/patch-1
Add support for new x64 architecture builds
2016-06-26 23:49:35 +03:00
533c3978a6 Add support for new x64 architecture builds
Add support for 10.0.14372.0 x64 architecture.
2016-06-26 14:36:12 -04:00
cabb00fc78 INI: Add support for new builds (fix #123)
10.0.14366.0 x86/x64
10.0.14367.0 x86/x64
2016-06-17 22:11:05 +03:00
078e5cd1cb Correct offsets for 14352 (fix #121) 2016-06-17 22:09:18 +03:00
d19a8cf733 INI: Add support for new builds (fix #119)
10.0.14352.1002 x86/x64
2016-05-30 17:40:06 +03:00
bb6d905b8d INI: Add support for new builds
10.0.14342.1000 x86/x64
2016-05-14 20:41:16 +03:00
53897b40c7 INI: Add support for new builds
10.0.14300.1000 x64
10.0.14328.1000 x86/x64
2016-05-08 18:39:11 +03:00
d3de408f7e Merge pull request #113 from maxpiva/master
INI: Add support for 10.0.14332.1001
2016-04-29 14:07:52 +03:00
69f46c6caf INI: Add support for 10.0.14332.1001 2016-04-29 01:34:19 -03:00
89a03ccba9 Merge pull request #111 from Chocobo1/inst_update
Update immediately after install
2016-04-23 22:17:56 +03:00
d02238218c Update immediately after install 2016-04-23 23:07:44 +08:00
37bcdd6414 INI: Add support for 10.0.14316.1000 2016-04-14 19:28:00 +03:00
6c58b69306 INI: Add support for 10.0.14295.1000 2016-04-06 14:12:47 +03:00
a7d7972ca4 INI: Experimental codes for ARMv7 2016-03-07 21:15:52 +03:00
fc58cf13c8 INI: Add support for 10.0.14279.1000 2016-03-06 14:19:32 +03:00
50e7459421 Repository: Update links 2016-03-06 05:58:29 +03:00
2c007fbb1d INI: Add support for 10.0.14271.1000 2016-02-29 14:37:49 +03:00
ff3df89647 INI: Add support for 10.0.14251.1000 2016-01-28 20:52:46 +03:00
103a687689 INI: Add support for 10.0.11102.1000 2016-01-26 18:38:13 +03:00
def243e15f Merge pull request #84 from fig2k4/master
Support for Delphi XE2 and above
2016-01-16 00:51:21 +03:00
9c6a8f4914 Support for Delphi XE2 and above 2016-01-15 21:17:20 +00:00
fdfbf0e1aa Support: Add termsrv 10.0.11082.1000 2016-01-15 22:59:48 +03:00
669c2bd20f Repository: Add .gitattributes 2016-01-15 22:57:51 +03:00
c881f80f60 Installer: Update messages 2016-01-15 19:22:39 +03:00
2fe23a1b4f Merge pull request #82 from fig2k4/master
dwResumeHandle initialized before calling EnumServicesStatusEx()
2016-01-15 19:06:32 +03:00
b0c471660b dwResumeHandle initialized before calling EnumServicesStatusEx() 2016-01-15 16:00:36 +00:00
b4a0fe1a7a Update README 2015-11-14 17:25:15 +03:00
741527eccd Support for build 10.0.10586.0 2015-11-14 16:44:08 +03:00
3d1f7c9e66 Tech update 2015-11-14 15:59:55 +03:00
733e617a1f Forgot about version 2015-08-12 22:01:19 +03:00
0c89dc564f More info 2015-08-12 20:13:24 +03:00
00e4c3bf19 Update links 2015-08-12 20:06:31 +03:00
eadebe921b Update instructions 2015-08-12 19:48:13 +03:00
5553d07206 v1.6 release notes 2015-08-12 19:39:06 +03:00
216255b3b4 Pre-release updates 2015-08-11 05:32:35 +03:00
e11b3c7354 Implement simple update routine 2015-08-07 04:33:37 +03:00
f534a1c8fc Merge pull request #44 from WisdomWolf/master
Fix for INI File (CR-LF and last line)
2015-08-01 15:36:16 +03:00
d4d5111711 maybe underscore? 2015-07-31 23:42:14 -04:00
4bf2866b49 added period to last line to preserve CR-LF when viewed on GitHub 2015-07-31 23:40:53 -04:00
7c52a27ba5 Merge branch 'master' of github.com:WisdomWolf/rdpwrap 2015-07-31 23:39:41 -04:00
e6686b3b35 corrected CR-LF at end of ini file 2015-07-31 23:39:10 -04:00
1f8e2b9e65 corrected CR-LF at end of ini file 2015-07-31 23:37:41 -04:00
946bd7f8a6 Update technical 2015-07-30 01:15:55 +03:00
b9149eef02 Fix wrong LocalOnly x86 offset 2015-07-30 01:09:12 +03:00
80387dcc31 Fix installer: check ImagePath without extension 2015-07-17 21:59:20 +03:00
8ac3396165 Small readme fix 2015-07-17 19:06:57 +03:00
8be10a125b Update readme 2015-07-17 18:50:40 +03:00
7baa979752 Update readme 2015-07-17 03:45:22 +03:00
425fc02fec New batch scripts 2015-07-17 02:39:09 +03:00
659ba3dbcf RDPCheck: update text 2015-07-17 02:35:05 +03:00
efe2872a26 Update INI modification date 2015-07-17 02:29:20 +03:00
ca71d4ace4 Small fix 2015-07-17 02:21:51 +03:00
a42b740946 More tech details 2015-07-17 02:19:07 +03:00
fca45f61e7 Update tech log 2015-07-17 02:06:27 +03:00
5062ff6c75 Update INI
- Added support for build 10.0.10240.16384
- Added HOW TO hints to KB
2015-07-17 01:28:23 +03:00
9a7c501ca9 Fix readme 2015-07-16 23:32:16 +03:00
adabe322c3 Update apps 2015-07-16 23:17:41 +03:00
eca971de03 Fix previous commit 2015-07-16 22:15:14 +03:00
6f23a18a24 Update INI
Move comments to KB file
Actual INI now have smaller size
2015-07-16 22:07:21 +03:00
09bfc748f4 Update readme 2015-07-16 21:48:52 +03:00
97d0b92054 Update tech log 2015-07-16 21:43:08 +03:00
867c271cb3 Readme: Update issues section 2015-06-23 20:03:14 +03:00
fd56533897 Add support for 10.0.10041.0 2015-03-23 18:13:24 +03:00
782dc346a9 New build has been discovered, obtaining files 2015-03-23 15:28:50 +03:00
ca36e9f49f Support for 10.0.9926.0 (x86) 2015-01-27 14:25:29 +03:00
513a7a1ebf 10.0.9926.0 x64 contributed by v-yadli 2015-01-24 20:36:45 +03:00
657ee646d5 Config: update policy values 2014-12-13 14:39:58 +03:00
5a37f663bc Updates discovered 2014-12-11 22:44:05 +03:00
25 changed files with 4804 additions and 1167 deletions

6
.gitattributes vendored Normal file
View File

@ -0,0 +1,6 @@
# Auto detect text files and perform LF normalization
* text=auto
# Plain text (Windows)
*.txt diff=astextplain eol=crlf
*.ini diff=astextplain eol=crlf

14
.gitignore vendored
View File

@ -1,6 +1,12 @@
# Unnecessary files
*.~pas
*.dproj.local
# Delphi local files (user-specific info)
*.local
*.identcache
# Delphi history and backups
__history/
*.~*
# Compiled binaries
*.dcu
*.exe
*.dll

541
README.md
View File

@ -1,206 +1,335 @@
<b>RDP Wrapper Library by Stas'M</b><br>
<br>
The goal of this project is to enable Remote Desktop Host support and concurrent RDP sessions on reduced functionality systems for home usage.<br>
<br>
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.<br>
<br>
Screenshots:<br>
<div style="padding-top: 4px; width: 534px; white-space: nowrap; overflow: auto; overflow-y: hidden">
<a href="http://stascorp.com/images/rdpwrap/VistaST.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pVistaST.jpg"></a>&nbsp;
<a href="http://stascorp.com/images/rdpwrap/VistaHB.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pVistaHB.jpg"></a>&nbsp;
<a href="http://stascorp.com/images/rdpwrap/Win7ST.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pWin7ST.jpg"></a>&nbsp;
<a href="http://stascorp.com/images/rdpwrap/Win7HB.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pWin7HB.jpg"></a>&nbsp;
<a href="http://stascorp.com/images/rdpwrap/Win8DP.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pWin8DP.jpg"></a>&nbsp;
<a href="http://stascorp.com/images/rdpwrap/Win8CP.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pWin8CP.jpg"></a>&nbsp;
<a href="http://stascorp.com/images/rdpwrap/Win8RP.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pWin8RP.jpg"></a>&nbsp;
<a href="http://stascorp.com/images/rdpwrap/Win8.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pWin8.jpg"></a>&nbsp;
<a href="http://stascorp.com/images/rdpwrap/Win81P.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pWin81P.jpg"></a>&nbsp;
<a href="http://stascorp.com/images/rdpwrap/Win81.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pWin81.jpg"></a>&nbsp;
<a href="http://stascorp.com/images/rdpwrap/Win10TP.png" target="_blank"><img src="http://stascorp.com/images/rdpwrap/pWin10TP.jpg"></a>&nbsp;
</div><br>
This solution was inspired by <a href="http://forums.mydigitallife.info/threads/39411-Windows-Product-Policy-Editor" target="_blank">Windows Product Policy Editor</a>, big thanks to <b>kost</b> :)<br>
- binarymaster<br>
<br>
Attention:<br>
It's recommended to have original termsrv.dll file with the RDP Wrapper installation. If you have modified it before with other patchers, it may become unstable and crash in any moment.<br>
<br>
Information:<br>
• Source code is available, so you can build it on your own<br>
• RDP Wrapper does not patch termsrv.dll, it loads termsrv with different parameters<br>
• RDPWInst and RDPChecker can be redistributed without development folder and batch files<br>
• RDPWInst can be used for unattended installation / deployment<br>
Windows 2000, XP and Server 2003 will not be supported<br>
<br>
Porting to other platforms:<br>
<b>ARM</b> for Windows RT (see links below)<br>
<b>IA-64</b> for Itanium-based Windows Server? <i>Well, I have no idea</i> :)<br>
<br>
Building the binaries:<br>
<b>x86 Delphi version</b> can be built with <i>Embarcadero RAD Studio 2010</i><br>
<b>x86/x64 C++ version</b> can be built with <i>Microsoft Visual Studio 2013</i><br>
<br>
<b>Links:</b><br>
• Official GitHub repository:<br>
<a href="https://github.com/binarymaster/rdpwrap/" target="_blank">https://github.com/binarymaster/rdpwrap/</a><br>
• Active discussion in the comments here:<br>
<a href="http://andrewblock.net/2013/07/19/enable-remote-desktop-on-windows-8-core/" target="_blank" title="Enable remote desktop on Windows 8 core / basic">Enable remote desktop on Windows 8 core / basic - Andrew Block .net</a><br>
• MDL Projects and Applications thread here:<br>
<a href="http://forums.mydigitallife.info/threads/55935-RDP-Wrapper-Library-(works-with-Windows-8-1-Basic)" target="_blank" title="Enable remote desktop on Windows 8 core / basic">RDP Wrapper Library (works with Windows 8.1 Basic)</a><br>
• Some ideas about porting to ARM for Windows RT (post #23):<br>
<a href="http://forum.xda-developers.com/showthread.php?t=2093525&page=3" target="_blank" title="Enable remote desktop on Windows 8 core / basic">[Q] Mod Windows RT to enable Remote Desktop</a><br>
• Adding «Remote Desktop Users» group:<br>
<a href="http://superuser.com/questions/680572/" target="_blank">http://superuser.com/questions/680572/</a><br>
<br>
Files description:<br>
<br>
<table style="border-collapse: collapse; width: 100%; border: 1px solid black;" width="" align="">
<tbody>
<tr><td style="border: 1px solid black;"><b>RDPWInst.exe</b></td><td style="border: 1px solid black;">RDP Wrapper Library installer/uninstaller</td></tr>
<tr><td style="border: 1px solid black;"><b>RDPCheck.exe</b></td><td style="border: 1px solid black;">Local RDP Checker (you can check the RDP is working)</td></tr>
<tr><td style="border: 1px solid black;"><b>RDPConf.exe</b></td><td style="border: 1px solid black;">RDP Wrapper Configuration</td></tr>
<tr><td style="border: 1px solid black;"><b>install.bat</b></td><td style="border: 1px solid black;">Quick install batch file</td></tr>
<tr><td style="border: 1px solid black;"><b>uninstall.bat</b></td><td style="border: 1px solid black;">Quick uninstall batch file</td></tr>
</tbody>
</table><br>
Change log:<br>
<br>
<b><u>2014.12.11</u></b><br>
• Version 1.5<br>
• Added INI config support<br>
• Configuration is stored in INI file now<br>
• We can extend version support without building new binaries<br>
• Added support for Windows 8.1 with KB3000850<br>
• Added support for Windows 10 Technical Preview Update 2<br>
• Installer updated<br>
• RDP Config updated<br>
• Diagnostics feature added to RDP Config<br>
<br>
<b><u>2014.11.14</u></b><br>
• Version 1.4<br>
• Added support for Windows 10 Technical Preview Update 1<br>
• Added support for Windows Vista SP2 with KB3003743<br>
Added support for Windows 7 SP1 with KB3003743<br>
• Added new RDP Configuration Program<br>
<br>
<b><u>2014.10.21</u></b><br>
• Installer updated<br>
• Added feature to install RDP Wrapper to System32 directory<br>
• Fixed issue in the installer - NLA setting now remains unchanged<br>
• Local RDP Checker updated<br>
• SecurityLayer and UserAuthentification values changed on check start<br>
• RDP Checker restores values on exit<br>
<br>
<b><u>2014.10.20</u></b><br>
• Version 1.3<br>
• Added support for Windows 10 Technical Preview<br>
• Added support for Windows 7 with KB2984972<br>
• Added support for Windows 8 with KB2973501<br>
• Added extended support for Windows Vista (SP0, SP1 and SP2)<br>
• Added extended support for Windows 7 (SP0 and SP1)<br>
• Some improvements in the source code<br>
• Installer updated to v2.2<br>
• Fixed installation bug in Vista x64 (wrong expand path)<br>
• Local RDP Checker updated<br>
• Added description to error 0x708<br>
<br>
<b><u>2014.07.26</u></b><br>
• Version 1.2<br>
• Added support for Windows 8 Developer Preview<br>
• Added support for Windows 8 Consumer Preview<br>
• Added support for Windows 8 Release Preview<br>
• Added support for Windows 8.1 Preview<br>
• Added support for Windows 8.1<br>
• More details you will see in the source code<br>
• Installer updated to v2.1<br>
<br>
<b><u>2013.12.09</u></b><br>
• C++ port of RDP Wrapper was made by <b>Fusix</b><br>
• x64 architecture is supported now<br>
• Added new command line installer v2.0<br>
• Added local RDP checker<br>
• Source code (C++ port, installer 2.0, local RDP checker) is also included<br>
<br>
<b><u>2013.10.25</u></b><br>
• Version 1.1 source code is available<br>
<br>
<b><u>2013.10.22</u></b><br>
• Version 1.1<br>
• Stable release<br>
• Improved wrapper (now it can wrap internal unexported termsrv.dll SL Policy function)<br>
• Added support for Windows 8 Single Language (tested on Acer Tablet PC with Intel Atom Z2760)<br>
<br>
<b><u>2013.10.19</u></b><br>
• Version 1.0<br>
• First [beta] version<br>
• Basic SL Policy wrapper<br>
<br>
<b>Supported Terminal Services versions:</b><br>
<u>6.0.X.X</u> (Windows Vista / Server 2008)<br>
<u>6.0.6000.16386</u> (Windows Vista)<br>
<u>6.0.6001.18000</u> (Windows Vista SP1)<br>
<u>6.0.6002.18005</u> (Windows Vista SP2)<br>
<u>6.0.6002.19214</u> (Windows Vista SP2 with KB3003743 GDR)<br>
<u>6.0.6002.23521</u> (Windows Vista SP2 with KB3003743 LDR)<br>
<u>6.1.X.X</u> (Windows 7 / Server 2008 R2)<br>
<u>6.1.7600.16385</u> (Windows 7)<br>
<u>6.1.7601.17514</u> (Windows 7 SP1)<br>
<u>6.1.7601.18540</u> (Windows 7 SP1 with KB2984972 GDR)<br>
<u>6.1.7601.22750</u> (Windows 7 SP1 with KB2984972 LDR)<br>
<u>6.1.7601.18637</u> (Windows 7 SP1 with KB3003743 GDR)<br>
<u>6.1.7601.22843</u> (Windows 7 SP1 with KB3003743 LDR)<br>
<u>6.2.8102.0</u> (Windows 8 Developer Preview)<br>
<u>6.2.8250.0</u> (Windows 8 Consumer Preview)<br>
<u>6.2.8400.0</u> (Windows 8 Release Preview)<br>
<u>6.2.9200.16384</u> (Windows 8 / Server 2012)<br>
<u>6.2.9200.17048</u> (Windows 8 with KB2973501 GDR)<br>
<u>6.2.9200.21166</u> (Windows 8 with KB2973501 LDR)<br>
<u>6.3.9431.0</u> (Windows 8.1 Preview)<br>
<u>6.3.9600.16384</u> (Windows 8.1 / Server 2012 R2)<br>
<u>6.3.9600.17095</u> (Windows 8.1 with KB2959626)<br>
<u>6.3.9600.17415</u> (Windows 8.1 with KB3000850)<br>
<u>6.4.9841.0</u> (Windows 10 Technical Preview)<br>
<u>6.4.9860.0</u> (Windows 10 Technical Preview Update 1)<br>
<u>6.4.9879.0</u> (Windows 10 Technical Preview Update 2)<br>
<br>
<b>Confirmed working on:</b><br>
• Windows Vista Starter (x86 - Service Pack 1 and higher)<br>
• Windows Vista Home Basic (x86 - Service Pack 1 and higher)<br>
• Windows Vista Home Premium (x86 - Service Pack 1 and higher)<br>
• Windows Vista Business (x86 - Service Pack 1 and higher)<br>
• Windows Vista Enterprise (x86 - Service Pack 1 and higher)<br>
• Windows Vista Ultimate (x86 - Service Pack 1 and higher)<br>
• Windows 7 Starter<br>
• Windows 7 Home Basic<br>
• Windows 7 Home Premium<br>
• Windows 7 Professional<br>
• Windows 7 Enterprise<br>
• Windows 7 Ultimate<br>
• Windows 8 Developer Preview<br>
• Windows 8 Consumer Preview<br>
• Windows 8 Release Preview<br>
• Windows 8<br>
• Windows 8 Single Language<br>
• Windows 8 Pro<br>
• Windows 8 Enterprise<br>
• Windows 8.1 Preview<br>
• Windows 8.1<br>
• Windows 8.1 Single Language<br>
• Windows 8.1 Pro<br>
• Windows 8.1 Enterprise<br>
• Windows 10 Technical Preview<br>
<br>
<b>Working partially:</b><br>
• Windows Vista Starter RTM x86 (termsrv.dll 6.0.6000.16386 : RDP works, but termsrv.dll crashes on logon attempt)<br>
<br>
<u>Installation instructions:</u><br>
1. Download latest release binaries and unpack files<br>
2. Run <b>Command Prompt (cmd)</b> as administrator<br>
3. Change directory to where you extracted the files<br>
4. Type <b>install.bat</b> and press Enter<br>
5. See command output for details<br>
<br>
<u>To uninstall:</u><br>
1. Run <b>Command Prompt</b> as administrator<br>
2. Change directory to where you extracted the files<br>
3. Type <b>uninstall.bat</b> and press Enter<br>
4. See command output for details<br>
# RDP Wrapper Library by Stas'M
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.
[pVistaST]: http://stascorp.com/images/rdpwrap/pVistaST.jpg
[pVistaHB]: http://stascorp.com/images/rdpwrap/pVistaHB.jpg
[pWin7ST]: http://stascorp.com/images/rdpwrap/pWin7ST.jpg
[pWin7HB]: http://stascorp.com/images/rdpwrap/pWin7HB.jpg
[pWin8DP]: http://stascorp.com/images/rdpwrap/pWin8DP.jpg
[pWin8CP]: http://stascorp.com/images/rdpwrap/pWin8CP.jpg
[pWin8RP]: http://stascorp.com/images/rdpwrap/pWin8RP.jpg
[pWin8]: http://stascorp.com/images/rdpwrap/pWin8.jpg
[pWin81P]: http://stascorp.com/images/rdpwrap/pWin81P.jpg
[pWin81]: http://stascorp.com/images/rdpwrap/pWin81.jpg
[pWin10TP]: http://stascorp.com/images/rdpwrap/pWin10TP.jpg
[pWin10PTP]: http://stascorp.com/images/rdpwrap/pWin10PTP.jpg
[pWin10]: http://stascorp.com/images/rdpwrap/pWin10.jpg
[fVistaST]: http://stascorp.com/images/rdpwrap/VistaST.png
[fVistaHB]: http://stascorp.com/images/rdpwrap/VistaHB.png
[fWin7ST]: http://stascorp.com/images/rdpwrap/Win7ST.png
[fWin7HB]: http://stascorp.com/images/rdpwrap/Win7HB.png
[fWin8DP]: http://stascorp.com/images/rdpwrap/Win8DP.png
[fWin8CP]: http://stascorp.com/images/rdpwrap/Win8CP.png
[fWin8RP]: http://stascorp.com/images/rdpwrap/Win8RP.png
[fWin8]: http://stascorp.com/images/rdpwrap/Win8.png
[fWin81P]: http://stascorp.com/images/rdpwrap/Win81P.png
[fWin81]: http://stascorp.com/images/rdpwrap/Win81.png
[fWin10TP]: http://stascorp.com/images/rdpwrap/Win10TP.png
[fWin10PTP]: http://stascorp.com/images/rdpwrap/Win10PTP.png
[fWin10]: http://stascorp.com/images/rdpwrap/Win10.png
| NT Version | Screenshots |
| ------------- | ----------- |
| Windows Vista | [![Windows Vista Starter][pVistaST]][fVistaST] [![Windows Vista Home Basic][pVistaHB]][fVistaHB] |
| Windows 7 | [![Windows 7 Starter][pWin7ST]][fWin7ST] [![Windows 7 Home Basic][pWin7HB]][fWin7HB] |
| Windows 8 | [![Windows 8 Developer Preview][pWin8DP]][fWin8DP] [![Windows 8 Consumer Preview][pWin8CP]][fWin8CP] [![Windows 8 Release Preview][pWin8RP]][fWin8RP] [![Windows 8][pWin8]][fWin8] |
| Windows 8.1 | [![Windows 8.1 Preview][pWin81P]][fWin81P] [![Windows 8.1][pWin81]][fWin81] |
| Windows 10 | [![Windows 10 Technical Preview][pWin10TP]][fWin10TP] [![Windows 10 Pro Technical Preview][pWin10PTP]][fWin10PTP] [![Windows 10][pWin10]][fWin10] |
---
[WinPPE]: http://forums.mydigitallife.info/threads/39411-Windows-Product-Policy-Editor
This solution was inspired by [Windows Product Policy Editor][WinPPE], big thanks to **kost** :)
— binarymaster
### Attention:
It's recommended to have original termsrv.dll file with the RDP Wrapper installation. If you have modified it before with other patchers, it may become unstable and crash in any moment.
### Information:
- Source code is available, so you can build it on your own
- RDP Wrapper does not patch termsrv.dll, it loads termsrv with different parameters
- RDPWInst and RDPChecker can be redistributed without development folder and batch files
- RDPWInst can be used for unattended installation / deployment
- Windows 2000, XP and Server 2003 will not be supported
### Porting to other platforms:
- **ARM** for Windows RT (see links below)
- **IA-64** for Itanium-based Windows Server? *Well, I have no idea* :)
### Building the binaries:
- **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://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
[yt-offsets]: http://www.youtube.com/watch?v=FiD86tmRBtk
### Links:
- Official GitHub repository:
<br>https://github.com/stascorp/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:
<br>[RDP Wrapper Library (works with Windows 8.1 Basic)][mydigitallife]
- Some ideas about porting to ARM for Windows RT (post #23):
<br>[\[Q\] Mod Windows RT to enable Remote Desktop][xda-dev]
- Adding «Remote Desktop Users» group:
<br>http://superuser.com/questions/680572/
### 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:
| File name | Description |
| --------- | ----------- |
| `RDPWInst.exe` | RDP Wrapper Library installer/uninstaller |
| `RDPCheck.exe` | Local RDP Checker (you can check the RDP is working) |
| `RDPConf.exe` | RDP Wrapper Configuration |
| `install.bat` | Quick install batch file |
| `uninstall.bat` | Quick uninstall batch file |
| `update.bat` | Quick update batch file |
### Frequently Asked Questions
> Where can I download the installer or binaries?
In the [GitHub Releases](https://github.com/stascorp/rdpwrap/releases) section.
> Is it legal to use this application?
There is no definitive answer, see [this discussion](https://github.com/stascorp/rdpwrap/issues/26).
> The installer tries to access the Internet, is it normal behaviour?
Yes, it works in online mode by default. You may disable it by removing `-o` flag in the `install.bat` file.
> 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.
> Config Tool shows `[not supported]` and RDP doesn't work. What can I do?
Make sure you're connected to the Internet and run `update.bat`.
> Update doesn't help, it still shows `[not supported]`.
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.
Change log:
#### 2016.08.01
- Version 1.6.1
- Include updated INI file for latest Windows builds
- Installer updated
- Added online install mode
- Added feature to keep settings on uninstall
- RDP Config updated
- Fixed update firewall rule on RDP port change
- Added feature to hide users on logon
#### 2015.08.12
- Version 1.6
- Added support for Windows 10
- INI file has smaller size now - all comments are moved to KB file
- Installer updated
- Added workaround for 1056 error (although it isn't an error)
- Added update support to installer
- Newest RDPClip versions are included with installer
- RDP Checker updated
- Changed connect IP to 127.0.0.2
- Updated some text messages
- RDP Config updated
- Added all possible shadowing modes
- Also it will write settings to the group policy
#### 2014.12.11
- Version 1.5
- Added INI config support
- Configuration is stored in INI file now
- We can extend version support without building new binaries
- Added support for Windows 8.1 with KB3000850
- Added support for Windows 10 Technical Preview Update 2
- Installer updated
- RDP Config updated
- Diagnostics feature added to RDP Config
#### 2014.11.14
- Version 1.4
- Added support for Windows 10 Technical Preview Update 1
- Added support for Windows Vista SP2 with KB3003743
- Added support for Windows 7 SP1 with KB3003743
- Added new RDP Configuration Program
#### 2014.10.21
- Installer updated
- Added feature to install RDP Wrapper to System32 directory
- Fixed issue in the installer - NLA setting now remains unchanged
- Local RDP Checker updated
- SecurityLayer and UserAuthentification values changed on check start
- RDP Checker restores values on exit
#### 2014.10.20
- Version 1.3
- Added support for Windows 10 Technical Preview
- Added support for Windows 7 with KB2984972
- Added support for Windows 8 with KB2973501
- Added extended support for Windows Vista (SP0, SP1 and SP2)
- Added extended support for Windows 7 (SP0 and SP1)
- Some improvements in the source code
- Installer updated to v2.2
- Fixed installation bug in Vista x64 (wrong expand path)
- Local RDP Checker updated
- Added description to error 0x708
#### 2014.07.26
- Version 1.2
- Added support for Windows 8 Developer Preview
- Added support for Windows 8 Consumer Preview
- Added support for Windows 8 Release Preview
- Added support for Windows 8.1 Preview
- Added support for Windows 8.1
- More details you will see in the source code
- Installer updated to v2.1
#### 2013.12.09
- C++ port of RDP Wrapper was made by Fusix
- x64 architecture is supported now
- Added new command line installer v2.0
- Added local RDP checker
- Source code (C++ port, installer 2.0, local RDP checker) is also included
#### 2013.10.25
- Version 1.1 source code is available
#### 2013.10.22
- Version 1.1
- Stable release
- Improved wrapper (now it can wrap internal unexported termsrv.dll SL Policy function)
- Added support for Windows 8 Single Language (tested on Acer Tablet PC with Intel Atom Z2760)
#### 2013.10.19
- Version 1.0
- First [beta] version
- Basic SL Policy wrapper
---
#### Supported Terminal Services versions:
- 6.0.X.X (Windows Vista / Server 2008)
- 6.0.6000.16386 (Windows Vista)
- 6.0.6001.18000 (Windows Vista SP1)
- 6.0.6002.18005 (Windows Vista SP2)
- 6.0.6002.19214 (Windows Vista SP2 with KB3003743 GDR)
- 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.7601.17514 (Windows 7 SP1)
- 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.2.8102.0 (Windows 8 Developer Preview)
- 6.2.8250.0 (Windows 8 Consumer Preview)
- 6.2.8400.0 (Windows 8 Release Preview)
- 6.2.9200.16384 (Windows 8 / Server 2012)
- 6.2.9200.17048 (Windows 8 with KB2973501 GDR)
- 6.2.9200.21166 (Windows 8 with KB2973501 LDR)
- 6.3.9431.0 (Windows 8.1 Preview)
- 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.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)
- 10.0.9926.0 (Windows 10 Pro Technical Preview)
- 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.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)
- 10.0.14271.1000 (Windows 10 RS1 Release 160218-2310)
- 10.0.14279.1000 (Windows 10 RS1 Release 160229-1700)
- 10.0.14295.1000 (Windows 10 RS1 Release 160318-1628)
- 10.0.14300.1000 (Windows Server 2016 Technical Preview 5)
- 10.0.14316.1000 (Windows 10 RS1 Release 160402-2227)
- 10.0.14328.1000 (Windows 10 RS1 Release 160418-1609)
- 10.0.14332.1001 (Windows 10 RS1 Release 160422-1940)
- 10.0.14342.1000 (Windows 10 RS1 Release 160506-1708)
- 10.0.14352.1002 (Windows 10 RS1 Release 160522-1930)
- 10.0.14366.0 (Windows 10 RS1 Release 160610-1700)
- 10.0.14367.0 (Windows 10 RS1 Release 160613-1700)
- 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.14388.0 (Windows 10 RS1 Release 160709-1635)
- 10.0.14393.0 (Windows 10 RS1 Release 160715-1616)
#### Confirmed working on:
- Windows Vista Starter (x86 - Service Pack 1 and higher)
- Windows Vista Home Basic
- Windows Vista Home Premium
- Windows Vista Business
- Windows Vista Enterprise
- Windows Vista Ultimate
- Windows Server 2008
- Windows 7 Starter
- Windows 7 Home Basic
- Windows 7 Home Premium
- Windows 7 Professional
- Windows 7 Enterprise
- Windows 7 Ultimate
- Windows Server 2008 R2
- Windows 8 Developer Preview
- Windows 8 Consumer Preview
- Windows 8 Release Preview
- Windows 8
- Windows 8 Single Language
- Windows 8 Pro
- Windows 8 Enterprise
- Windows Server 2012
- Windows 8.1 Preview
- Windows 8.1
- Windows 8.1 Connected (with Bing)
- Windows 8.1 Single Language
- Windows 8.1 Connected Single Language (with Bing)
- Windows 8.1 Pro
- Windows 8.1 Enterprise
- Windows Server 2012 R2
- Windows 10 Technical Preview
- Windows 10 Pro Technical Preview
- Windows 10 Home
- Windows 10 Home Single Language
- Windows 10 Pro
- 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
- See command output for details
To update INI file:
- Right-click on **`update.bat`** and select Run as Administrator
- See command output for details
To uninstall:
- Go to the directory where you extracted the files
- Right-click on **`uninstall.bat`** and select Run as Administrator
- See command output for details

14
bin/install.bat Normal file
View File

@ -0,0 +1,14 @@
@echo off
if not exist "%~dp0RDPWInst.exe" goto :error
"%~dp0RDPWInst" -i -o
echo ______________________________________________________________
echo.
echo You can check RDP functionality with RDPCheck program.
echo Also you can configure advanced settings with RDPConf program.
echo.
goto :anykey
:error
echo [-] Installer executable not found.
echo Please extract all files from the downloaded package or check your anti-virus.
:anykey
pause

10
bin/uninstall.bat Normal file
View File

@ -0,0 +1,10 @@
@echo off
if not exist "%~dp0RDPWInst.exe" goto :error
"%~dp0RDPWInst" -u
echo.
goto :anykey
:error
echo [-] Installer executable not found.
echo Please extract all files from the downloaded package or check your anti-virus.
:anykey
pause

10
bin/update.bat Normal file
View File

@ -0,0 +1,10 @@
@echo off
if not exist "%~dp0RDPWInst.exe" goto :error
"%~dp0RDPWInst" -w
echo.
goto :anykey
:error
echo [-] Installer executable not found.
echo Please extract all files from the downloaded package or check your anti-virus.
:anykey
pause

Binary file not shown.

Binary file not shown.

172
res/rdpwrap-arm-kb.ini Normal file
View File

@ -0,0 +1,172 @@
; RDP Wrapper Library configuration
; for Windows RT (ARMv7)
; This is experimental file
[Main]
Updated=2016-03-07
LogFile=\rdpwrap.txt
[SLPolicy]
TerminalServices-RemoteConnectionManager-AllowRemoteConnections=1
TerminalServices-RemoteConnectionManager-AllowMultipleSessions=1
TerminalServices-RemoteConnectionManager-AllowAppServerMode=1
TerminalServices-RemoteConnectionManager-AllowMultimon=1
TerminalServices-RemoteConnectionManager-MaxUserSessions=0
TerminalServices-RemoteConnectionManager-ce0ad219-4670-4988-98fb-89b14c2f072b-MaxSessions=0
TerminalServices-RemoteConnectionManager-45344fe7-00e6-4ac6-9f01-d01fd4ffadfb-MaxSessions=2
TerminalServices-RDP-7-Advanced-Compression-Allowed=1
TerminalServices-RemoteConnectionManager-45344fe7-00e6-4ac6-9f01-d01fd4ffadfb-LocalOnly=0
TerminalServices-RemoteConnectionManager-8dc86f1d-9969-4379-91c1-06fe1dc60575-MaxSessions=1000
TerminalServices-DeviceRedirection-Licenses-TSEasyPrintAllowed=1
TerminalServices-DeviceRedirection-Licenses-PnpRedirectionAllowed=1
TerminalServices-DeviceRedirection-Licenses-TSMFPluginAllowed=1
TerminalServices-RemoteConnectionManager-UiEffects-DWMRemotingAllowed=1
[PatchCodes]
Zero=00
bjmp5=05E0
CDefPolicy_Query_r3_r5=40F20013C5F8203305E0
CDefPolicy_Query_r3_r0=40F20013C0F8203305E0
[6.2.9200.16384]
; Patch CSessionArbitrationHelper::IsSingleSessionPerUserEnabled
; .text:10066DCC MOV.W R3, #0x11C
; .text:10066DD0 STR R3, [SP,#0x16C+var_13C]
; .text:10066DD2 LDR R3, =__imp_GetVersionExW
; .text:10066DD4 MOVS R4, #1 <- 0
; .text:10066DD6 ADD R0, SP, #0x16C+var_13C
; .text:10066DD8 LDR R3, [R3]
SingleUserPatch.arm=1
SingleUserOffset.arm=66DD4
SingleUserCode.arm=Zero
; Patch CDefPolicy::Query
; Original
; .text:10059164 LDR.W R2, [R5,#0x324] ; D5 F8 24 23 ; [R5,#0x324] -> R2
; .text:10059168 LDR.W R3, [R5,#0x320] ; D5 F8 20 33 ; [R5,#0x320] -> R3
; .text:1005916C CMP R2, R3 ; 9A 42 ; compare
; .text:1005916E BNE loc_1005917A ; 04 D1 ; jump if (R2 != R3)
; Changed
; .text:10059164 MOVW R3, #0x100 ; 40 F2 00 13 ; 0x100 -> R3
; .text:10059168 STR.W R3, [R5,#0x320] ; C5 F8 20 33 ; R3 -> [R5,#0x320]
; .text:1005916C B loc_1005917A ; 05 E0 ; jump
; .text:1005916E BNE loc_1005917A ; 04 D1 ; / never executed /
DefPolicyPatch.arm=1
DefPolicyOffset.arm=59164
DefPolicyCode.arm=CDefPolicy_Query_r3_r5
; Hook SLGetWindowsInformationDWORDWrapper
SLPolicyInternal.arm=1
SLPolicyOffset.arm=5F934
SLPolicyFunc.arm=New_Win8SL
[6.3.9600.16384]
; Patch CEnforcementCore::GetInstanceOfTSLicense
; .text:1008E6C2 BL _IsLicenseTypeLocalOnly_CSLQuery__SAJAAU_GUID__PAH_Z ; CSLQuery::IsLicenseTypeLocalOnly(_GUID &,int *)
; .text:1008E6C6 CMP R0, #0
; .text:1008E6C8 BLT loc_1008E6DA
; .text:1008E6CA LDR R3, [SP,#0x20+var_14]
; .text:1008E6CC CBZ R3, loc_1008E6DA ; 2B B1 ; jump if (R3 == 0)
; Changed
; .text:1008E6CC B loc_1008E6DA ; 05 E0 ; jump
LocalOnlyPatch.arm=1
LocalOnlyOffset.arm=8E6CC
LocalOnlyCode.arm=bjmp5
; Patch CSessionArbitrationHelper::IsSingleSessionPerUserEnabled
; .text:10069E74 MOV.W R3, #0x11C
; .text:10069E78 STR R3, [SP,#0x164+var_13C]
; .text:10069E7A LDR R3, =__imp_GetVersionExW
; .text:10069E7C MOVS R4, #1 <- 0
; .text:10069E7E ADD R0, SP, #0x164+var_13C
; .text:10069E80 LDR R3, [R3]
SingleUserPatch.arm=1
SingleUserOffset.arm=69E7C
SingleUserCode.arm=Zero
; Patch CDefPolicy::Query
; Original
; .text:10064D54 LDR.W R2, [R0,#0x324] ; D0 F8 24 23 ; [R0,#0x324] -> R2
; .text:10064D58 LDR.W R3, [R0,#0x320] ; D0 F8 20 33 ; [R0,#0x320] -> R3
; .text:10064D5C CMP R2, R3 ; 9A 42 ; compare
; .text:10064D5E BNE loc_10064D6A ; 04 D1 ; jump if (R2 != R3)
; Changed
; .text:10064D54 MOVW R3, #0x100 ; 40 F2 00 13 ; 0x100 -> R3
; .text:10064D58 STR.W R3, [R0,#0x320] ; C0 F8 20 33 ; R3 -> [R0,#0x320]
; .text:10064D5C B loc_10064D6A ; 05 E0 ; jump
; .text:10064D5E BNE loc_10064D6A ; 04 D1 ; / never executed /
DefPolicyPatch.arm=1
DefPolicyOffset.arm=64D54
DefPolicyCode.arm=CDefPolicy_Query_r3_r0
; Hook CSLQuery::Initialize
SLInitHook.arm=1
SLInitOffset.arm=32188
SLInitFunc.arm=New_CSLQuery_Initialize
[6.3.9600.17095]
; Patch CEnforcementCore::GetInstanceOfTSLicense
; .text:1008E35A BL _IsLicenseTypeLocalOnly_CSLQuery__SAJAAU_GUID__PAH_Z ; CSLQuery::IsLicenseTypeLocalOnly(_GUID &,int *)
; .text:1008E35E CMP R0, #0
; .text:1008E360 BLT loc_1008E372
; .text:1008E362 LDR R3, [SP,#0x20+var_14]
; .text:1008E364 CBZ R3, loc_1008E372 ; 2B B1 ; jump if (R3 == 0)
; Changed
; .text:1008E364 B loc_1008E372 ; 05 E0 ; jump
LocalOnlyPatch.arm=1
LocalOnlyOffset.arm=8E364
LocalOnlyCode.arm=bjmp5
; Patch CSessionArbitrationHelper::IsSingleSessionPerUserEnabled
; .text:10069C2C MOV.W R3, #0x11C
; .text:10069C30 STR R3, [SP,#0x164+var_13C]
; .text:10069C32 LDR R3, =GetVersionExW
; .text:10069C34 MOVS R4, #1 <- 0
; .text:10069C36 ADD R0, SP, #0x164+var_13C
; .text:10069C38 LDR R3, [R3]
SingleUserPatch.arm=1
SingleUserOffset.arm=69C34
SingleUserCode.arm=Zero
; Patch CDefPolicy::Query
; Original
; .text:100649E0 LDR.W R2, [R0,#0x324] ; D0 F8 24 23 ; [R0,#0x324] -> R2
; .text:100649E4 LDR.W R3, [R0,#0x320] ; D0 F8 20 33 ; [R0,#0x320] -> R3
; .text:100649E8 CMP R2, R3 ; 9A 42 ; compare
; .text:100649EA BNE loc_100649F6 ; 04 D1 ; jump if (R2 != R3)
; Changed
; .text:100649E0 MOVW R3, #0x100 ; 40 F2 00 13 ; 0x100 -> R3
; .text:100649E4 STR.W R3, [R0,#0x320] ; C0 F8 20 33 ; R3 -> [R0,#0x320]
; .text:100649E8 B loc_10064D6A ; 05 E0 ; jump
; .text:100649EA BNE loc_10064D6A ; 04 D1 ; / never executed /
DefPolicyPatch.arm=1
DefPolicyOffset.arm=649E0
DefPolicyCode.arm=CDefPolicy_Query_r3_r0
; Hook CSLQuery::Initialize
SLInitHook.arm=1
SLInitOffset.arm=32E3C
SLInitFunc.arm=New_CSLQuery_Initialize
[SLInit]
bServerSku=1
bRemoteConnAllowed=1
bFUSEnabled=1
bAppServerAllowed=1
bMultimonAllowed=1
lMaxUserSessions=0
ulMaxDebugSessions=0
bInitialized=1
[6.3.9600.16384-SLInit]
bFUSEnabled.arm =A57E0
lMaxUserSessions.arm =A57E4
bAppServerAllowed.arm =A57E8
bInitialized.arm =A57EC
bMultimonAllowed.arm =A57F0
bServerSku.arm =A57F4
ulMaxDebugSessions.arm=A57F8
bRemoteConnAllowed.arm=A57FC
[6.3.9600.17095-SLInit]
bFUSEnabled.arm =A67E0
lMaxUserSessions.arm =A67E4
bAppServerAllowed.arm =A67E8
bInitialized.arm =A67EC
bMultimonAllowed.arm =A67F0
bServerSku.arm =A67F4
ulMaxDebugSessions.arm=A67F8
bRemoteConnAllowed.arm=A67FC

2626
res/rdpwrap-ini-kb.txt Normal file

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 2014 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.
@ -25,7 +25,8 @@ uses
Windows,
Classes,
WinSvc,
Registry;
Registry,
WinInet;
function EnumServicesStatusEx(
hSCManager: SC_HANDLE;
@ -75,6 +76,7 @@ const
TermService = 'TermService';
var
Installed: Boolean;
Online: Boolean;
WrapPath: String;
Arch: Byte;
OldWow64RedirectionValue: LongBool;
@ -159,7 +161,8 @@ begin
end;
TermServiceHost := Reg.ReadString('ImagePath');
Reg.CloseKey;
if Pos('svchost.exe', LowerCase(TermServiceHost)) = 0 then
if (Pos('svchost.exe', LowerCase(TermServiceHost)) = 0)
and (Pos('svchost -k', LowerCase(TermServiceHost)) = 0) then
begin
Reg.Free;
Writeln('[-] TermService is hosted in a custom application (BeTwin, etc.) - unsupported.');
@ -282,32 +285,45 @@ var
hSvc: THandle;
Code: DWORD;
pch: PWideChar;
procedure ExitError(Func: String; ErrorCode: DWORD);
begin
if hSC > 0 then
CloseServiceHandle(hSC);
if hSvc > 0 then
CloseServiceHandle(hSvc);
Writeln('[-] ', Func, ' error (code ', ErrorCode, ').');
end;
begin
hSC := 0;
hSvc := 0;
Writeln('[*] Starting ', SvcName, '...');
hSC := OpenSCManager(nil, SERVICES_ACTIVE_DATABASE, SC_MANAGER_CONNECT);
if hSC = 0 then
begin
Code := GetLastError;
Writeln('[-] OpenSCManager error (code ', Code, ').');
ExitError('OpenSCManager', GetLastError);
Exit;
end;
hSvc := OpenService(hSC, PWideChar(SvcName), SERVICE_START);
if hSvc = 0 then
begin
CloseServiceHandle(hSC);
Code := GetLastError;
Writeln('[-] OpenService error (code ', Code, ').');
ExitError('OpenService', GetLastError);
Exit;
end;
pch := nil;
if not StartService(hSvc, 0, pch) then begin
CloseServiceHandle(hSvc);
CloseServiceHandle(hSC);
Code := GetLastError;
Writeln('[-] StartService error (code ', Code, ').');
Exit;
if Code = 1056 then begin // Service already started
Sleep(2000); // or SCM hasn't registered killed process
if not StartService(hSvc, 0, pch) then begin
ExitError('StartService', Code);
Exit;
end;
end else begin
ExitError('StartService', Code);
Exit;
end;
end;
CloseServiceHandle(hSvc);
CloseServiceHandle(hSC);
@ -334,6 +350,8 @@ begin
Halt(Code);
end;
dwResumeHandle := 0;
SetLength(Svc, 1489);
FillChar(Svc[0], sizeof(Svc[0])*Length(Svc), 0);
if not EnumServicesStatusEx(hSC, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_STATE_ALL,
@ -590,7 +608,41 @@ begin
Str.Free;
end;
function GitINIFile(var Content: String): Boolean;
const
URL = 'https://raw.githubusercontent.com/stascorp/rdpwrap/master/res/rdpwrap.ini';
var
NetHandle: HINTERNET;
UrlHandle: HINTERNET;
Str: String;
Buf: Array[0..1023] of Byte;
BytesRead: DWORD;
begin
Result := False;
Content := '';
NetHandle := InternetOpen('RDP Wrapper Update', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
if not Assigned(NetHandle) then
Exit;
UrlHandle := InternetOpenUrl(NetHandle, PChar(URL), nil, 0, INTERNET_FLAG_RELOAD, 0);
if not Assigned(UrlHandle) then
begin
InternetCloseHandle(NetHandle);
Exit;
end;
repeat
InternetReadFile(UrlHandle, @Buf[0], SizeOf(Buf), BytesRead);
SetString(Str, PAnsiChar(@Buf[0]), BytesRead);
Content := Content + Str;
until BytesRead = 0;
InternetCloseHandle(UrlHandle);
InternetCloseHandle(NetHandle);
Result := True;
end;
procedure ExtractFiles;
var
RDPClipRes, S: String;
OnlineINI: TStringList;
begin
if not DirectoryExists(ExtractFilePath(ExpandPath(WrapPath))) then
if ForceDirectories(ExtractFilePath(ExpandPath(WrapPath))) then
@ -600,19 +652,46 @@ begin
Writeln('[*] Path: ', ExtractFilePath(ExpandPath(WrapPath)));
Halt(0);
end;
ExtractRes('config', ExtractFilePath(ExpandPath(WrapPath)) + 'rdpwrap.ini');
if Online then
begin
Writeln('[*] Downloading latest INI file...');
OnlineINI := TStringList.Create;
if GitINIFile(S) then begin
OnlineINI.Text := S;
S := ExtractFilePath(ExpandPath(WrapPath)) + 'rdpwrap.ini';
OnlineINI.SaveToFile(S);
Writeln('[+] Latest INI file -> ', S);
end
else
begin
Writeln('[-] Failed to get online INI file, using built-in.');
Online := False;
end;
OnlineINI.Free;
end;
if not Online then
ExtractRes('config', ExtractFilePath(ExpandPath(WrapPath)) + 'rdpwrap.ini');
RDPClipRes := '';
case Arch of
32: begin
ExtractRes('rdpw32', ExpandPath(WrapPath));
if not FileExists(ExpandPath('%SystemRoot%\System32\rdpclip.exe')) then
ExtractRes('rdpclip32', ExpandPath('%SystemRoot%\System32\rdpclip.exe'));
if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 0) then
RDPClipRes := 'rdpclip6032';
if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 1) then
RDPClipRes := 'rdpclip6132';
end;
64: begin
ExtractRes('rdpw64', ExpandPath(WrapPath));
if not FileExists(ExpandPath('%SystemRoot%\System32\rdpclip.exe')) then
ExtractRes('rdpclip64', ExpandPath('%SystemRoot%\System32\rdpclip.exe'));
if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 0) then
RDPClipRes := 'rdpclip6064';
if (FV.Version.w.Major = 6) and (FV.Version.w.Minor = 1) then
RDPClipRes := 'rdpclip6164';
end;
end;
if RDPClipRes <> '' then
if not FileExists(ExpandPath('%SystemRoot%\System32\rdpclip.exe')) then
ExtractRes(RDPClipRes, ExpandPath('%SystemRoot%\System32\rdpclip.exe'));
end;
procedure DeleteFiles;
@ -698,6 +777,12 @@ procedure CheckTermsrvVersion;
var
SuppLvl: Byte;
VerTxt: String;
procedure UpdateMsg;
begin
Writeln('Try running "update.bat" or "RDPWInst -w" to download latest INI file.');
Writeln('If it doesn''t help, send your termsrv.dll to project developer for support.');
end;
begin
GetFileVersion(ExpandPath(TermServicePath), FV);
VerTxt := Format('%d.%d.%d.%d',
@ -739,12 +824,12 @@ begin
case SuppLvl of
0: begin
Writeln('[-] This version of Terminal Services is not supported.');
Writeln('Send your termsrv.dll to project developer for support.');
UpdateMsg;
end;
1: begin
Writeln('[!] This version of Terminal Services is supported partially.');
Writeln('It means you may have some limitations such as only 2 concurrent sessions.');
Writeln('Send your termsrv.dll to project developer for adding full support.');
UpdateMsg;
end;
2: begin
Writeln('[+] This version of Terminal Services is fully supported.');
@ -878,29 +963,124 @@ begin
ExecWait('netsh advfirewall firewall delete rule name="Remote Desktop"');
end;
function CheckINIDate(Filename, Content: String; var Date: Integer): Boolean;
var
Str: TStringList;
I: Integer;
begin
Result := False;
Str := TStringList.Create;
if Filename <> '' then begin
try
Str.LoadFromFile(Filename);
except
Writeln('[-] Failed to read INI file.');
Exit;
end;
end else
Str.Text := Content;
for I := 0 to Str.Count - 1 do
if Pos('Updated=', Str[I]) = 1 then
Break;
if I >= Str.Count then begin
Writeln('[-] Failed to check INI date.');
Exit;
end;
Content := StringReplace(Str[I], 'Updated=', '', []);
Content := StringReplace(Content, '-', '', [rfReplaceAll]);
Str.Free;
try
Date := StrToInt(Content);
except
Writeln('[-] Wrong INI date format.');
Exit;
end;
Result := True;
end;
procedure CheckUpdate;
var
INIPath, S: String;
Str: TStringList;
I, OldDate, NewDate: Integer;
begin
INIPath := ExtractFilePath(ExpandPath(TermServicePath)) + 'rdpwrap.ini';
if not CheckINIDate(INIPath, '', OldDate) then
Halt(ERROR_ACCESS_DENIED);
Writeln('[*] Current update date: ',
Format('%d.%.2d.%.2d', [OldDate div 10000, OldDate div 100 mod 100, OldDate mod 100]));
if not GitINIFile(S) then begin
Writeln('[-] Failed to download latest INI from GitHub.');
Halt(ERROR_ACCESS_DENIED);
end;
if not CheckINIDate('', S, NewDate) then
Halt(ERROR_ACCESS_DENIED);
Writeln('[*] Latest update date: ',
Format('%d.%.2d.%.2d', [NewDate div 10000, NewDate div 100 mod 100, NewDate mod 100]));
if NewDate = OldDate then
Writeln('[*] Everything is up to date.')
else
if NewDate > OldDate then begin
Writeln('[+] New update is available, updating...');
CheckTermsrvProcess;
Writeln('[*] Terminating service...');
AddPrivilege('SeDebugPrivilege');
KillProcess(TermServicePID);
Sleep(1000);
if Length(ShareSvc) > 0 then
for I := 0 to Length(ShareSvc) - 1 do
SvcStart(ShareSvc[I]);
Sleep(500);
Str := TStringList.Create;
Str.Text := S;
try
Str.SaveToFile(INIPath);
except
Writeln('[-] Failed to write INI file.');
Halt(ERROR_ACCESS_DENIED);
end;
Str.Free;
SvcStart(TermService);
Writeln('[+] Update completed.');
end else
Writeln('[*] Your INI file is newer than public file. Are you a developer? :)');
end;
var
I: Integer;
begin
Writeln('RDP Wrapper Library v1.5');
Writeln('Installer v2.2');
Writeln('Copyright (C) Stas''M Corp. 2014');
Writeln('RDP Wrapper Library v1.6');
Writeln('Installer v2.3');
Writeln('Copyright (C) Stas''M Corp. 2016');
Writeln('');
if (ParamCount < 1)
or (
(ParamStr(1) <> '-l')
and (ParamStr(1) <> '-i')
and (ParamStr(1) <> '-w')
and (ParamStr(1) <> '-u')
and (ParamStr(1) <> '-r')
) then
begin
Writeln('USAGE:');
Writeln('RDPWInst.exe [-l|-i[-s]|-u|-r]');
Writeln('RDPWInst.exe [-l|-i[-s][-o]|-w|-u[-k]|-r]');
Writeln('');
Writeln('-l display the license agreement');
Writeln('-i install wrapper to Program Files folder (default)');
Writeln('-i -s install wrapper to System32 folder');
Writeln('-i -o online install mode (loads latest INI file)');
Writeln('-w get latest update for INI file');
Writeln('-u uninstall wrapper');
Writeln('-u -k uninstall wrapper and keep settings');
Writeln('-r force restart Terminal Services');
Exit;
end;
@ -946,6 +1126,7 @@ begin
CheckTermsrvProcess;
Writeln('[*] Extracting files...');
Online := (ParamStr(2) = '-o') or (ParamStr(3) = '-o');
ExtractFiles;
Writeln('[*] Configuring service library...');
@ -1008,16 +1189,31 @@ begin
SvcStart(TermService);
Sleep(500);
Writeln('[*] Configuring registry...');
TSConfigRegistry(False);
Writeln('[*] Configuring firewall...');
TSConfigFirewall(False);
if ParamStr(2) <> '-k' then
begin
Writeln('[*] Configuring registry...');
TSConfigRegistry(False);
Writeln('[*] Configuring firewall...');
TSConfigFirewall(False);
end;
if Arch = 64 then
RevertWowRedirection;
Writeln('[+] Successfully uninstalled.');
end;
if ParamStr(1) = '-w' then
begin
if not Installed then
begin
Writeln('[*] RDP Wrapper Library is not installed.');
Halt(ERROR_INVALID_FUNCTION);
end;
Writeln('[*] Checking for updates...');
CheckUpdate;
end;
if ParamStr(1) = '-r' then
begin
Writeln('[*] Restarting...');

View File

@ -20,8 +20,9 @@
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_ExeOutput>..\bin\</DCC_ExeOutput>
<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
<DCC_DependencyCheckOutputName>RDPWInst.exe</DCC_DependencyCheckOutputName>
<DCC_DependencyCheckOutputName>..\bin\RDPWInst.exe</DCC_DependencyCheckOutputName>
<DCC_ImageBase>00400000</DCC_ImageBase>
<DCC_Platform>x86</DCC_Platform>
</PropertyGroup>
@ -41,14 +42,14 @@
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<ProjectExtensions>
@ -60,7 +61,7 @@
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
<Parameters Name="RunParams">-i</Parameters>
<Parameters Name="RunParams">-w</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>

Binary file not shown.

View File

@ -1,5 +1,5 @@
{
Copyright 2014 Stas'M Corp.
Copyright 2015 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.
@ -44,13 +44,12 @@ implementation
procedure TFrm.FormCreate(Sender: TObject);
var
Reg: TRegistry;
Port: Integer;
begin
RDP.DisconnectedText := 'Disconnected.';
RDP.ConnectingText := 'Connecting...';
RDP.ConnectedStatusText := 'Connected.';
RDP.UserName := '';
RDP.Server := '127.0.0.1';
RDP.Server := '127.0.0.2';
Reg := TRegistry.Create;
Reg.RootKey := HKEY_LOCAL_MACHINE;
@ -132,8 +131,8 @@ begin
$1707: ErrStr := 'Delegation of credentials to the target server is not allowed unless mutual authentication has been achieved.';
$2207: ErrStr := 'The smart card is blocked.';
$1C07: ErrStr := 'An incorrect PIN was presented to the smart card.';
$B09: ErrStr := 'Network Level Authentication is required.';
$708: ErrStr := 'The RDP seems to work, but your client doesn''t support loopback connections. Try to connect to your PC from another device in the network.';
$B09: ErrStr := 'Network Level Authentication is required, run RDPCheck as administrator.';
$708: ErrStr := 'RDP is working, but the client doesn''t allow loopback connections. Try to connect to your PC from another device in the network.';
else ErrStr := 'Unknown code 0x'+IntToHex(discReason, 1);
end;
if (discReason > 2) then

View File

@ -20,8 +20,9 @@
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_ExeOutput>..\bin\</DCC_ExeOutput>
<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
<DCC_DependencyCheckOutputName>RDPCheck.exe</DCC_DependencyCheckOutputName>
<DCC_DependencyCheckOutputName>..\bin\RDPCheck.exe</DCC_DependencyCheckOutputName>
<DCC_ImageBase>00400000</DCC_ImageBase>
<DCC_Platform>x86</DCC_Platform>
</PropertyGroup>
@ -44,14 +45,14 @@
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<ProjectExtensions>
@ -68,7 +69,7 @@
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">2</VersionInfo>
<VersionInfo Name="MinorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">2</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
@ -82,13 +83,13 @@
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName">Stas&apos;M Corp.</VersionInfoKeys>
<VersionInfoKeys Name="FileDescription">Local RDP Checker</VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">2.1.0.0</VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">2.2.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName">RDPCheck</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright">Copyright © Stas&apos;M Corp. 2014</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright">Copyright © Stas&apos;M Corp. 2015</VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks">Stas&apos;M Corp.</VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename">RDPCheck.exe</VersionInfoKeys>
<VersionInfoKeys Name="ProductName">RDP Host Support</VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.3.0.0</VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.6.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments">http://stascorp.com</VersionInfoKeys>
</VersionInfoKeys>
<Excluded_Packages>

Binary file not shown.

View File

@ -3,8 +3,8 @@ object MainForm: TMainForm
Top = 0
BorderStyle = bsDialog
Caption = 'RDP Wrapper Configuration'
ClientHeight = 326
ClientWidth = 351
ClientHeight = 314
ClientWidth = 404
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -18,114 +18,80 @@ object MainForm: TMainForm
OnDestroy = FormDestroy
PixelsPerInch = 96
TextHeight = 13
object lRDPPort: TLabel
Left = 225
Top = 103
Width = 47
Height = 13
Caption = 'RDP Port:'
end
object bOK: TButton
Left = 10
Top = 293
Left = 40
Top = 281
Width = 75
Height = 25
Caption = 'OK'
ModalResult = 1
TabOrder = 0
TabOrder = 4
OnClick = bOKClick
end
object bCancel: TButton
Left = 91
Top = 293
Left = 121
Top = 281
Width = 75
Height = 25
Caption = 'Cancel'
ModalResult = 2
TabOrder = 1
TabOrder = 5
OnClick = bCancelClick
end
object bApply: TButton
Left = 172
Top = 293
Left = 202
Top = 281
Width = 75
Height = 25
Caption = 'Apply'
Enabled = False
TabOrder = 2
TabOrder = 6
OnClick = bApplyClick
end
object cbSingleSessionPerUser: TCheckBox
Left = 8
Top = 112
Width = 130
Height = 17
Caption = 'Single Session Per User'
TabOrder = 3
OnClick = cbAllowTSConnectionsClick
end
object rgNLA: TRadioGroup
Left = 8
Top = 135
Width = 335
Height = 73
Caption = 'Security Mode'
Items.Strings = (
'Disable Security (not recommended)'
'Default Authentication (compatibility with older clients)'
'Network Level Authentication (best)')
TabOrder = 4
OnClick = cbAllowTSConnectionsClick
end
object cbAllowTSConnections: TCheckBox
Left = 8
Left = 202
Top = 89
Width = 174
Height = 17
Caption = 'Enable Remote Desktop Protocol'
TabOrder = 5
Width = 194
Height = 73
Caption = 'Authentication Mode'
Items.Strings = (
'GUI Authentication Only'
'Default RDP Authentication'
'Network Level Authentication')
TabOrder = 2
OnClick = cbAllowTSConnectionsClick
end
object rgShadow: TRadioGroup
Left = 8
Top = 214
Width = 335
Height = 73
Left = 202
Top = 168
Width = 194
Height = 105
Caption = 'Session Shadowing Mode'
Items.Strings = (
'Disable Shadowing'
'Shadowing will request user'#39's permission'
'Shadow sessions immediately')
TabOrder = 6
'Full access with user'#39's permission'
'Full access without permission'
'View only with user'#39's permission'
'View only without permission')
TabOrder = 3
OnClick = cbAllowTSConnectionsClick
end
object seRDPPort: TSpinEdit
Left = 278
Top = 100
Width = 62
Height = 22
MaxValue = 65535
MinValue = 0
TabOrder = 7
Value = 0
OnChange = seRDPPortChange
end
object bLicense: TButton
Left = 253
Top = 293
Left = 283
Top = 281
Width = 87
Height = 25
Caption = 'View license...'
TabOrder = 8
TabOrder = 7
OnClick = bLicenseClick
end
object gbDiag: TGroupBox
Left = 8
Top = 6
Width = 335
Width = 388
Height = 77
Caption = 'Diagnostics'
TabOrder = 9
TabOrder = 0
object lListener: TLabel
Left = 11
Top = 55
@ -155,7 +121,7 @@ object MainForm: TMainForm
Caption = 'Unknown'
end
object lsTSVer: TLabel
Left = 206
Left = 226
Top = 36
Width = 44
Height = 13
@ -169,14 +135,14 @@ object MainForm: TMainForm
Caption = 'Unknown'
end
object lsWrapVer: TLabel
Left = 206
Left = 226
Top = 17
Width = 44
Height = 13
Caption = 'Unknown'
end
object lTSVer: TLabel
Left = 182
Left = 202
Top = 36
Width = 20
Height = 13
@ -190,24 +156,77 @@ object MainForm: TMainForm
Caption = 'Wrapper state:'
end
object lWrapVer: TLabel
Left = 182
Left = 202
Top = 17
Width = 20
Height = 13
Caption = 'ver.'
end
object lsSuppVer: TLabel
Left = 182
Left = 202
Top = 55
Width = 70
Height = 13
Caption = '[support level]'
end
end
object gbGeneral: TGroupBox
Left = 8
Top = 89
Width = 188
Height = 184
Caption = 'General Settings'
TabOrder = 1
object lRDPPort: TLabel
Left = 8
Top = 44
Width = 47
Height = 13
Caption = 'RDP port:'
end
object cbAllowTSConnections: TCheckBox
Left = 8
Top = 18
Width = 132
Height = 17
Caption = 'Enable Remote Desktop'
TabOrder = 0
OnClick = cbAllowTSConnectionsClick
end
object cbSingleSessionPerUser: TCheckBox
Left = 8
Top = 69
Width = 129
Height = 17
Caption = 'Single session per user'
TabOrder = 2
OnClick = cbAllowTSConnectionsClick
end
object cbHideUsers: TCheckBox
Left = 8
Top = 92
Width = 149
Height = 17
Caption = 'Hide users on logon screen'
TabOrder = 3
OnClick = cbAllowTSConnectionsClick
end
object seRDPPort: TSpinEdit
Left = 61
Top = 41
Width = 62
Height = 22
MaxValue = 65535
MinValue = 0
TabOrder = 1
Value = 0
OnChange = seRDPPortChange
end
end
object Timer: TTimer
Interval = 250
OnTimer = TimerTimer
Left = 280
Top = 19
Left = 352
Top = 27
end
end

View File

@ -1,5 +1,5 @@
{
Copyright 2014 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.
@ -47,6 +47,8 @@ type
bLicense: TButton;
gbDiag: TGroupBox;
lsSuppVer: TLabel;
cbHideUsers: TCheckBox;
gbGeneral: TGroupBox;
procedure FormCreate(Sender: TObject);
procedure cbAllowTSConnectionsClick(Sender: TObject);
procedure seRDPPortChange(Sender: TObject);
@ -61,6 +63,7 @@ type
{ Private declarations }
public
{ Public declarations }
function ExecWait(Cmdline: String): Boolean;
procedure ReadSettings;
procedure WriteSettings;
end;
@ -89,6 +92,7 @@ var
Ready: Boolean = False;
Arch: Byte;
OldWow64RedirectionValue: LongBool;
OldPort: Word;
INI: String;
function WinStationEnumerateW(hServer: THandle;
@ -329,6 +333,29 @@ begin
Str.Free;
end;
function TMainForm.ExecWait(Cmdline: String): Boolean;
var
si: STARTUPINFO;
pi: PROCESS_INFORMATION;
begin
Result := False;
ZeroMemory(@si, sizeof(si));
si.cb := sizeof(si);
si.dwFlags := STARTF_USESHOWWINDOW;
si.wShowWindow := SW_HIDE;
UniqueString(Cmdline);
if not CreateProcess(nil, PWideChar(Cmdline), nil, nil, True, 0, nil, nil, si, pi) then begin
MessageBox(Handle,
PWideChar('CreateProcess error (code: ' + IntToStr(GetLastError) + ').'),
'Error', MB_ICONERROR or MB_OK);
Exit;
end;
CloseHandle(pi.hThread);
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
Result := True;
end;
procedure TMainForm.ReadSettings;
var
Reg: TRegistry;
@ -356,6 +383,7 @@ begin
except
end;
OldPort := seRDPPort.Value;
SecurityLayer := 0;
UserAuthentication := 0;
try
@ -374,6 +402,13 @@ begin
rgShadow.ItemIndex := Reg.ReadInteger('Shadow');
except
end;
Reg.CloseKey;
Reg.OpenKeyReadOnly('\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System');
try
cbHideUsers.Checked := Reg.ReadBool('dontdisplaylastusername');
except
end;
Reg.CloseKey;
Reg.Free;
@ -404,6 +439,11 @@ begin
Reg.WriteInteger('PortNumber', seRDPPort.Value);
except
end;
if OldPort <> seRDPPort.Value then
begin
OldPort := seRDPPort.Value;
ExecWait('netsh advfirewall firewall set rule name="Remote Desktop" new localport=' + IntToStr(OldPort));
end;
case rgNLA.ItemIndex of
0: begin
@ -437,6 +477,22 @@ begin
except
end;
end;
Reg.CloseKey;
Reg.OpenKey('\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services', True);
if rgShadow.ItemIndex >= 0 then begin
try
Reg.WriteInteger('Shadow', rgShadow.ItemIndex);
except
end;
end;
Reg.CloseKey;
Reg.OpenKey('\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System', True);
try
Reg.WriteBool('dontdisplaylastusername', cbHideUsers.Checked);
except
end;
Reg.CloseKey;
Reg.Free;

View File

@ -20,8 +20,9 @@
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_ExeOutput>..\bin\</DCC_ExeOutput>
<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
<DCC_DependencyCheckOutputName>RDPConf.exe</DCC_DependencyCheckOutputName>
<DCC_DependencyCheckOutputName>..\bin\RDPConf.exe</DCC_DependencyCheckOutputName>
<DCC_ImageBase>00400000</DCC_ImageBase>
<DCC_Platform>x86</DCC_Platform>
</PropertyGroup>
@ -47,14 +48,14 @@
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<ProjectExtensions>

Binary file not shown.

Binary file not shown.

View File

@ -73,7 +73,7 @@ const
var
INI: INIFile;
LogFile: String = '\rdpwrap.txt';
bw: DWORD;
bw: {$if CompilerVersion>=16} NativeUInt {$else} DWORD {$endif};
IsHooked: Boolean = False;
// Unhooked import

View File

@ -42,14 +42,14 @@
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<ProjectExtensions>

View File

@ -1,50 +1,206 @@
RDP Wrapper Library project by Stas'M
Terminal Services supported versions
6.0.X.X (Windows Vista, any) [policy hook only]
6.0.6000.16386 (Windows Vista) [policy hook + extended patch]
6.0.6001.18000 (Windows Vista SP1) [policy hook + extended patch]
6.0.6001.22565 (Windows Vista SP1 with KB977541) [todo]
6.0.6001.22635 (Windows Vista SP1 with KB970911) [todo]
6.0.6001.22801 (Windows Vista SP1 with KB2381675) [todo]
6.0.6002.18005 (Windows Vista SP2) [policy hook + extended patch]
6.0.6002.22269 (Windows Vista SP2 with KB977541) [todo]
6.0.6002.22340 (Windows Vista SP2 with KB970911) [todo]
6.0.6002.22515 (Windows Vista SP2 with KB2381675) [todo]
6.0.6002.22641 (Windows Vista SP2 with KB2523307) [todo]
6.0.6002.19214 (Windows Vista SP2 with KB3003743 GDR) [policy hook + extended patch]
6.0.6002.23521 (Windows Vista SP2 with KB3003743 LDR) [policy hook + extended patch]
6.1.X.X (Windows 7, any) [policy hook only]
6.1.7600.16385 (Windows 7) [policy hook + extended patch]
6.1.7600.20890 (Windows 7 with KB2479710) [todo]
6.1.7600.21316 (Windows 7 with KB2750090) [todo]
6.1.7601.17514 (Windows 7 SP1) [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.18540 (Windows 7 SP1 with KB2984972 GDR) [policy hook + extended patch]
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.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]
6.2.9200.16384 (Windows 8) [policy hook + extended patch]
6.2.9200.17048 (Windows 8 with KB2973501 GDR) [policy hook + extended patch]
6.2.9200.21166 (Windows 8 with KB2973501 LDR) [policy hook + extended patch]
6.3.9431.0 (Windows 8.1 Preview) [init hook + extended patch]
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.4.9841.0 (Windows 10 Technical Preview) [init hook + extended patch]
6.4.9860.0 (Windows 10 Technical Preview Update 1) [init hook + extended patch]
6.4.9879.0 (Windows 10 Technical Preview Update 2) [init hook + extended patch]
Known failures
6.0.6000.16386 (Windows Vista RTM x86, crashes on logon attempt)
6.0.X.X (Windows Vista, any) [policy hook only]
6.0.6000.16386 (Windows Vista) [policy hook + extended patch]
6.0.6000.20723 (Windows Vista with KB944917) [todo]
6.0.6001.18000 (Windows Vista SP1) [policy hook + extended patch]
6.0.6001.22286 (Windows Vista SP1 with KB958612) [todo]
6.0.6001.22357 (Windows Vista SP1 with KB958612 v2) [todo]
6.0.6001.22323 (Windows Vista SP1 with KB960742) [todo]
6.0.6001.22392 (Windows Vista SP1 with KB968680) [todo]
6.0.6001.22565 (Windows Vista SP1 with KB977541) [todo]
6.0.6001.22635 (Windows Vista SP1 with KB970911) [todo]
6.0.6001.22801 (Windows Vista SP1 with KB2381675) [todo]
6.0.6002.18005 (Windows Vista SP2) [policy hook + extended patch]
6.0.6002.22269 (Windows Vista SP2 with KB977541) [todo]
6.0.6002.22340 (Windows Vista SP2 with KB970911) [todo]
6.0.6002.22515 (Windows Vista SP2 with KB2381675) [todo]
6.0.6002.22641 (Windows Vista SP2 with KB2523307) [todo]
6.0.6002.22790 (Windows Vista SP2 with KB2672601) [todo]
6.0.6002.19214 (Windows Vista SP2 with KB3003743 GDR) [policy hook + extended patch]
6.0.6002.23521 (Windows Vista SP2 with KB3003743 LDR) [policy hook + extended patch]
6.1.X.X (Windows 7, any) [policy hook only]
6.1.7100.0 (Windows 7 Release Candidate) [todo]
6.1.7600.16385 (Windows 7) [policy hook + extended patch]
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) [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) [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]
6.1.7601.22477 (Windows 7 SP1 with KB2896256) [todo]
6.1.7601.18540 (Windows 7 SP1 with KB2984972 GDR) [policy hook + extended patch]
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.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]
6.2.9200.16384 (Windows 8) [policy hook + extended patch]
6.2.9200.17048 (Windows 8 with KB2973501 GDR) [policy hook + extended patch]
6.2.9200.21166 (Windows 8 with KB2973501 LDR) [policy hook + extended patch]
6.3.9431.0 (Windows 8.1 Preview) [init hook + extended patch]
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.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]
10.0.9926.0 (Windows 10 Pro Technical Preview) [init hook + extended patch]
10.0.10041.0 (Windows 10 Pro Technical Preview UP1) [init hook + extended patch]
10.0.10049.0 (Windows 10 Pro Technical Preview UP2) [todo]
10.0.10061.0 (Windows 10 Pro Technical Preview UP3) [todo]
10.0.10240.16384 (Windows 10 RTM) [init hook + extended patch]
10.0.10525.0 (Windows 10 th2_release.150812-1658) [todo]
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.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]
10.0.14271.1000 (Windows 10 rs1_release.160218-2310) [init hook + extended patch]
10.0.14279.1000 (Windows 10 rs1_release.160229-1700) [init hook + extended patch]
10.0.14295.1000 (Windows 10 rs1_release.160318-1628) [init hook + extended patch]
10.0.14300.1000 (Windows Server 2016 Technical Preview 5) [init hook + extended patch]
10.0.14316.1000 (Windows 10 rs1_release.160402-2227) [init hook + extended patch]
10.0.14328.1000 (Windows 10 rs1_release.160418-1609) [init hook + extended patch]
10.0.14332.1001 (Windows 10 rs1_release.160422-1940) [init hook + extended patch]
10.0.14342.1000 (Windows 10 rs1_release.160506-1708) [init hook + extended patch]
10.0.14352.1002 (Windows 10 rs1_release.160522-1930) [init hook + extended patch]
10.0.14366.0 (Windows 10 rs1_release.160610-1700) [init hook + extended patch]
10.0.14367.0 (Windows 10 rs1_release.160613-1700) [init hook + extended patch]
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.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]
Source code changelog (rdpwrap library):
2016.08.01 :
- preparing the release
2016.07.23 :
- added online install mode to installer
- added feature to keep settings on uninstall
- fixed update firewall rule on port change in config tool
- added feature to hide users on logon
2016.07.22 :
- added support for termsrv.dll 10.0.14393.0
2016.07.15 :
- added support for termsrv.dll 10.0.14383.0
- added support for termsrv.dll 10.0.14388.0
2016.07.06 :
- added support for termsrv.dll 10.0.14379.0
2016.06.27 :
- added support for termsrv.dll 10.0.14372.0 x86
2016.06.26 :
- added support for termsrv.dll 10.0.14372.0 x64 by kbmorris
2016.06.17 :
- fixed issue with termsrv.dll 10.0.14352.1002
- added support for termsrv.dll 10.0.14366.0
- added support for termsrv.dll 10.0.14367.0
2016.05.30 :
- added support for termsrv.dll 10.0.14352.1002
2016.05.14 :
- added support for termsrv.dll 10.0.14342.1000
2016.05.08 :
- added support for termsrv.dll 10.0.14300.1000 x64
- added support for termsrv.dll 10.0.14328.1000
2016.04.29 :
- added support for termsrv.dll 10.0.14332.1001 by maxpiva
2016.04.14 :
- added support for termsrv.dll 10.0.14316.1000
2016.04.06 :
- added support for termsrv.dll 10.0.14295.1000
2016.03.07 :
- added experimental codes for ARMv7 architecture (see rdpwrap-arm-kb.ini)
- Windows RT / termsrv.dll 6.2.9200.16384
- Windows RT 8.1 / termsrv.dll 6.3.9600.16384
- Windows RT 8.1 / termsrv.dll 6.3.9600.17095
2016.03.06 :
- added support for termsrv.dll 10.0.14279.1000
2016.02.29 :
- added support for termsrv.dll 10.0.14271.1000
2016.01.28 :
- added support for termsrv.dll 10.0.14251.1000
2016.01.26 :
- added support for termsrv.dll 10.0.11102.1000
2016.01.15 :
- updated messages in the installer
- added support for termsrv.dll 10.0.11082.1000
2015.11.14 :
- added support for termsrv.dll 10.0.10586.0
2015.08.11 :
- embed new rdpclip versions in the installer (for NT 6.0 and 6.1)
- preparing the release
2015.08.07 :
- added INI update feature to installer
2015.07.30 :
- fixed issue with Windows 10 Home x86 (wrong LocalOnly offset was specified in INI file)
2015.07.17 :
- added support for termsrv.dll 10.0.10240.16384
- added HOW TO hints to KB (so other reverse engineers can do this hard work more easier)
2015.07.16 :
- moved all comments from INI file to Knowledge Base text file
- now INI file have smaller size
- updated RDP checker: changed IP Address to 127.0.0.2 (sometimes client doesn't want to connect .1), updated text message
- updated RDP config: list all possible shadowing modes, also write group policy
- updated installer: added workaround for 1056 error
- updated copyright years in source code
- obtained files from build 10.0.10240.16384
- researching Windows 10 RTM
2015.03.23 :
- researching Windows 10 Pro Technical Preview UP1
- added support for termsrv.dll 10.0.10041.0
2015.03.20 :
- new build 10.0.10041.0 was released, obtaining files...
2015.01.26 :
- researching Windows 10 Pro Technical Preview (10.0.9926.0 x86)
- added support for termsrv.dll 10.0.9926.0 (x86)
2015.01.22 :
- v-yadli contributed offsets for version 10.0.9926.0 (x64)
2014.12.13 :
- added more policy values to INI file
2014.12.10 :
- C++ version seems to work well now!
- added support for termsrv.dll 6.4.9879.0