Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new autoupdate batch file, rdpwrap.ini updates #859

Open
wants to merge 24 commits into
base: master
from

Conversation

@asmtron
Copy link

asmtron commented Aug 12, 2019

autoupdate.bat - Automatic RDP Wrapper installer and updater
dl: autoupdate-v07.09.2019.zip

rdpwrap.ini - add support for termsrv.dll versions:
10.0.18362.657
10.0.18362.267
10.0.18362.53
10.0.18362.1
10.0.17763.437
10.0.17763.379
10.0.17763.292
10.0.17763.165 x64
10.0.17134.706
10.0.17134.1304
10.0.14393.3383
10.0.14393.3471
10.0.14393.3503
6.3.9600.19628 (x64)
dl: rdpwrap.ini from 16 Feb 2020


The new batch file "autoupdate.bat" check, install and update the RDP Wrapper automatically in the background. For example very useful after a windows update reboot ...

{ Special thak to binarymaster and all other contributors }

 -------------------------------------------------------------------

                        autoupdate.bat

 Automatic RDP Wrapper installer and updater // asmtron (07-09-2019)
 -------------------------------------------------------------------
 Options:
   -log        = redirect display output to the file autoupdate.log
   -taskadd    = add autorun of autoupdate.bat on startup in schedule task
   -taskremove = remove autorun of autoupdate.bat on startup in schedule task

 Info: 
   The autoupdater first use and check the official rdpwrap.ini.
   If a new termsrv.dll is not supported in the offical rdpwrap.ini,
   autoupdater first tries the asmtron rdpwrap.ini (mostly disassembled and
   tested by asmtron). The autoupdater will also use rdpwrap.ini files
   of other contributors like the one of "saurav-biswas".
   New/extra rdpwrap.ini sources can also be defined...

 { Special thak to binarymaster and all other contributors }




 INSTALL of RDP Wrapper and Autoupdater
 ======================================

 1. Copy the files from the archive "RDPWrap-v1.6.2.zip" (or newer) to the "%ProgramFiles%\RDP Wrapper" directory

    DO NOT use other location to install/extract the RDP Wrapper files.
    USE ONLY the "%ProgramFiles%\RDP Wrapper" directory (normally C:\Program Files\RDP Wrapper)


 2. Copy the files/folder from the archive "autoupdate-v07.09.2019.zip" (or newer) to the "%ProgramFiles%\RDP Wrapper" directory


 3. To enable autorun of autoupdate.bat on system startup, run the folling helper batch file as administrator:

    "%ProgramFiles%\RDP Wrapper\helper\autoupdate__enable_autorun_on_startup.bat"


 4. Set in your Antivirus/WindowsDefnder an exclusion on the folder "%ProgramFiles%\RDP Wrapper" to prevent the deletion of RDP Wrapper files


 5. Now you can use the autoupdate batch file to install and update the RDP Wrapper. Please run the folling autoupdate batch file as administrator:

   "%ProgramFiles%\RDP Wrapper\autoupdate.bat"

asmtron added 3 commits Aug 12, 2019
Automatic RDP Wrapper installer and updater
….53 ...

additional termsrv.dll versions (disassembled and tested)
10.0.18362.267
10.0.18362.53
10.0.18362.1
10.0.17763.437
10.0.17763.379
10.0.17763.292
10.0.17763.165 x64
10.0.17134.706
asmtron added 3 commits Aug 12, 2019
force uninstall/reinstall of RDP Wrapper on a new version of termsrv.dll
add: check if installed termsrv.dll fileversion is different to the last saved termsrv.dll fileversion in registry; it detects all termsrv.dll version changes (for example from a windows update)
@PrplHaz4

This comment has been minimized.

Copy link

PrplHaz4 commented Aug 12, 2019

Thanks for writing this up @asmtron and including a PR. This seems to be a much safer way to distribute changes/updates to RDPwrap. Much better than linking to some random site with precompiled binaries...etc.

As it stands, the issues here could easily be (already are?) a vector for malware distribution, as people tend to just click, download and run.

It really is a shame none of this work is getting merged into the repo - clearly there are lots of people dependent on this wrapper being functional.

@binarymaster any chance of adding @asmtron and/or @saurav-biswas as a maintainer on the repo?

@junkwes

This comment has been minimized.

Copy link

junkwes commented Aug 12, 2019

Listener state: Not listening

bug: normal copy with admin right of the file "rdpwrap_new.ini" to "rdpwrap.ini" will not work properly (file locked)
fix: we need to stream the data line by line from "rdpwrap_new.ini" to "rdpwrap.ini"
add: listener check
@asmtron

This comment has been minimized.

Copy link
Author

asmtron commented Aug 13, 2019

Important -> autoupdate.bat **bugfix!

  1. bug: normal copy with admin right of the file "rdpwrap_new.ini" to "rdpwrap.ini" will not work properly (file locked)
  2. fix: we need to stream the data line by line from "rdpwrap_new.ini" to "rdpwrap.ini"
  3. add: listener check

With this bugfix autoupdate.bat works now as expected...

@asmtron asmtron changed the title new autoupdate batch file, rdpwrap.ini updates new autoupdate batch file **(bugfix), rdpwrap.ini updates Aug 13, 2019
@asmtron asmtron changed the title new autoupdate batch file **(bugfix), rdpwrap.ini updates new autoupdate batch file, rdpwrap.ini updates Aug 13, 2019
asmtron added 4 commits Aug 13, 2019
add: set "Network Level Authentication" in the windows registry
info: you can disable this feature by removing the two commands "call :setNLA" (line 207 and line 248)
@asmtron asmtron mentioned this pull request Aug 13, 2019
asmtron added 5 commits Aug 13, 2019
code optimization: speedup the file streaming by 600%
rdpwrap.ini - add support for termsrv.dll versions:
10.0.18362.267
10.0.18362.53
10.0.18362.1
10.0.17763.437
10.0.17763.379
10.0.17763.292
10.0.17763.165 x64
10.0.17134.706
(+saurav-biswas changes)
asmtron added 2 commits Sep 7, 2019
code optimization: speedup streaming rdpwrap_new.ini to rdpwrap.ini
@DRSDavidSoft

This comment has been minimized.

Copy link

DRSDavidSoft commented on res/rdpwrap.ini in 9abffc4 Sep 8, 2019

This line needs to be commented, see this: #1

@DRSDavidSoft

This comment was marked as outdated.

Copy link

DRSDavidSoft commented on res/rdpwrap.ini in 9abffc4 Sep 8, 2019

This line needs to be commented, see this: #1

@DRSDavidSoft

This comment was marked as outdated.

Copy link

DRSDavidSoft commented on res/rdpwrap.ini in 9abffc4 Sep 8, 2019

This line needs to be commented, see this: #1

@zzeroo

This comment has been minimized.

Copy link

zzeroo commented Jan 9, 2020

@victorhooi see the autoupdate.bat. Look at the line rdpwrap_ini_update_github_3=

REM ***SNIP***
REM   tested by asmtron). The autoupdater will also use rdpwrap.ini files
REM   of other contributors like the one of "saurav-biswas".
REM   Extra rdpwrap.ini sources can also be defined...
REM
REM { Special thak to binarymaster, saurav-biswas and all other contributors }

REM -----------------------------------------
REM Location of new/updated rdpwrap.ini files
REM -----------------------------------------
set rdpwrap_ini_update_github_1="https://raw.githubusercontent.com/asmtron/rdpwrap/master/res/rdpwrap.ini"
set rdpwrap_ini_update_github_2="https://raw.githubusercontent.com/saurav-biswas/rdpwrap-1/patch-1/res/rdpwrap.ini"
REM set rdpwrap_ini_update_github_3="https://raw.githubusercontent.com/....Extra.3...."
REM set rdpwrap_ini_update_github_4="https://raw.githubusercontent.com/....Extra.4...."
REM ***SNAP***
@gerardoparedes

This comment has been minimized.

Copy link

gerardoparedes commented Feb 1, 2020

I have 18362.592 it everything is in green but still only one connection allowed

image
image

@MarkosTech

This comment has been minimized.

Copy link

MarkosTech commented Feb 2, 2020

same

add support for 10.0.14393.3383 and 10.0.14393.3471 (thanks to fre4kyC0de)
@jfariasf

This comment has been minimized.

Copy link

jfariasf commented Feb 6, 2020

Have the same issue even with the 7e21baf commit. The program passes all checks but it doesn't work on 18362.592. Any current user will be required to disconnect.

Edit: It worked when the updater downloaded a DLL. I don't know the source of this file.

@hyj1991

This comment has been minimized.

Copy link

hyj1991 commented Feb 11, 2020

LGTM, thx :)

add support for 10.0.18362.657
@Adeshwar03

This comment has been minimized.

Copy link

Adeshwar03 commented Feb 13, 2020

pls update if you can for 10.0.14393.3503

add support for 10.0.14393.3503
add support for 10.0.17134.1304
add support for 6.3.9600.19628
@AnDrEyKa-111

This comment has been minimized.

Copy link

AnDrEyKa-111 commented Feb 17, 2020

@asmtron hi! I modified your autoupdate script: it now saves versions of termsrv.dll and remembers last supported version. So if dll is updated and new version is not supported, it replace new unsupported version from saved last supported one. And waiting, when support of new version is added. And when new version is get supported, it replace old supported version from saved new one. So the "server" will always be in multi-user RDP mode and run up-to-date dll as soon as it posible automaticly. I tested this modified script for some typical situations, it works fine, but i think it need more testing before share it for all. Is it interesting for you? How can i send it to you?

@asmtron

This comment has been minimized.

Copy link
Author

asmtron commented Feb 18, 2020

@AnDrEyKa-111

This comment has been minimized.

Copy link

AnDrEyKa-111 commented Feb 18, 2020

autoupdate.zip

Hi,   very good idea to store the current termsrv.dll and to use it as fall back on new windows updates ;)   The best way is if you upload (pull request) your modified autoupdate.bat to https://github.com/asmtron/rdpwrap/tree/master/bin and when it is ready, we can merge it with the original autoupdate.bat.   thx,      

Here it is (in attachment). I'm newbie here, can't find how to pull request...

@mariagil1975

This comment has been minimized.

Copy link

mariagil1975 commented Feb 18, 2020

Could you tell us a little tutorial on how to perform the complete installation with the new “autouodate”
I think that the first thing to do is install the RDPWInst-v1.6.2.msi
From here I have complicated with the updates. What I was doing was putting the rdpwrap_ini_updater and re-install in the% ProgramFiles% \ RDP Wrapper directory.
Then I unzip the files “autoupdate-v07.09.2019” in the same location and run “autoupdate__enable_autorun_on_startup.bat” and now I also add the file “autoupdate.bat” in the directory (I don't know if I have to execute it) What is the correct method?

@pelaooo

This comment has been minimized.

Copy link

pelaooo commented Feb 18, 2020

I have the same question. I don't know how to do the installation again and how to install the autoupdate.bat

@affinityv

This comment has been minimized.

Copy link

affinityv commented Feb 19, 2020

That updater is used AFTER the install, at any time. It simply adds some extra sections to the INI file, based only on what the auto-updater cmd file knows about. That won't get you all the possible combinations, but if the cmd file has knowledge about /your/ system, ala, it has the right ini section, then it will be good. The cmd file will restart RDP, nothing more to do from what I can see. But you must run the cmd file from an elevated cmd session (run as administrator).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.