

IF /I EXIST %SystemRoot%\System32\termsrv.dll.%SET_VERSION%.bak GOTO PATCHEDĬOPY "%SystemRoot%\System32\termsrv.dll" "%SystemRoot%\System32\*.*.%SET_VERSION%.bak" REM Update: Mikinho, changed to TermService for globalization ICACLS %SystemRoot%\System32\termsrv.dll /Grant Administrators:F ICACLS %SystemRoot%\System32\termsrv.dll /Grant "%USERNAME%":F Takeown /a /f %SystemRoot%\System32\termsrv.dll
TERMSRV DLL WINDOWS
REM directory will change if launched from a network shareĮCHO Source Folder is %SOURCEFOLDER%, Windows is %ARCH%-bitĮCHO Taking ownership of %SystemRoot%\System32\termsrv.dll REM This will get the folder the batch file was launched from since the current IF /I EXIST %SystemRoot%\SysWOW64 (SET ARCH=64) ELSE (SET ARCH=32) IF /I NOT "%CSDBUILDNUMBER%" = %SET_CSDBUILDNUMBER% GOTO UNSUPPORTEDĮCHO Your operating system is not supported. IF /I NOT "%CURRENTBUILD%" = %SET_CURRENTBUILD% GOTO UNSUPPORTEDįOR /F "tokens=3" %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "CSDBuildNumber"') DO SET CSDBUILDNUMBER=%%A

IF /I NOT "%EDITIONID%" = "Ultimate" IF /I NOT "%EDITIONID%" = "Enterprise" IF /I NOT "%EDITIONID%" = "Professional" IF /I NOT "%EDITIONID%" = "HomePremium" GOTO UNSUPPORTEDįOR /F "tokens=3" %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "CurrentBuild"') DO SET CURRENTBUILD=%%A


REM IF /I NOT "%PRODUCTNAME%" = %SET_PRODUCTNAME% GOTO UNSUPPORTEDįOR /F "tokens=3" %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') DO SET EDITIONID=%%A IF "%%i"="SeTakeOwnershipPrivilege" SET HasAdminRights=1įOR /F "tokens=3*" %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName ^| FIND "ProductName"') DO SET PRODUCTNAME=%%A %%B REM Note: Mikinho, Updated admin right checks to a more appropiate method
TERMSRV DLL PASSWORD
TITLE Concurrent Remote Desktop Sessions %WINVER%ĮCHO This script enables concurrent remote desktop sessionsĮCHO This script must be run as an Administrator.ĮCHO To open an elevated command prompt with Administrator privilegesĮCHO press WinKey, typ cmd, and hit Ctrl+Shift+Enter.ĮCHO multi Enable multiple sessions per user.ĮCHO blank Enable remote logon for user accounts that are not password protected. SET SET_VERSION=%SET_CURRENTBUILD%.%SET_CSDBUILDNUMBER%
