::[Bat To Exe Converter] :: ::YAwzoRdxOk+EWAjk ::fBw5plQjdCyDJGyX8VAjFDlYTReHAE+1EbsQ5+n//NalsEQTX6IWdpzP27iCJfIv40bre4UR4n9IlfgJGA5IQTyKQyp6oG1N1g== ::YAwzuBVtJxjWCl3EqQJgSA== ::ZR4luwNxJguZRRnk ::Yhs/ulQjdF+5 ::cxAkpRVqdFKZSjk= ::cBs/ulQjdF+5 ::ZR41oxFsdFKZSDk= ::eBoioBt6dFKZSDk= ::cRo6pxp7LAbNWATEpCI= ::egkzugNsPRvcWATEpCI= ::dAsiuh18IRvcCxnZtBJQ ::cRYluBh/LU+EWAnk ::YxY4rhs+aU+IeA== ::cxY6rQJ7JhzQF1fEqQJnZkwaFWQ= ::ZQ05rAF9IBncCkqN+0xwdVsDAlPMZQs= ::ZQ05rAF9IAHYFVzEqQIRAClzDDCHLmb6NbAI/fib ::eg0/rx1wNQPfEVWB+kM9LVsJDCWqDkyFMrAO5dfI6v6Ssi0= ::fBEirQZwNQPfEVWB+kM9LVsJDCWqDkyFMrAO5dfI6v6Ssi0= ::cRolqwZ3JBvQF1fEqQISOhJaR0SDMm/6J7kT4Om73O+Tt119 ::dhA7uBVwLU+EWHisxmVQ ::YQ03rBFzNR3SWATE0EMmIR8TX0SgKXm9A6cPiA== ::dhAmsQZ3MwfNWATE1k4xOx4Udg2MP2Da ::ZQ0/vhVqMQ3MEVWAtB9wSA== ::Zg8zqx1/OA3MEVWAtB9wSA== ::dhA7pRFwIByZRRnk ::Zh4grVQjdCyDJGyX8VAjFDlYTReHAE+1EbsQ5+n//NalsEQTX6IWdpzP27iCJfIv3kD2eKUowm9K1s4UCXs= ::YB416Ek+ZW8= :: :: ::978f952a14a936cc963da21a135fa983 ::Blase Zinck ::https://github.com/jeremyben/thebatchman ::https://github.com/julianollivieira/b2executable :: Styled Text: https://gist.githubusercontent.com/mlocati/fdabcaeb8071d5c75a2d51712db24011/raw/b710612d6320df7e146508094e84b92b34c77d48/win10colors.cmd set sVer=2.2.2 ::Changelog: ::2.2.2 - 01/10/24 :: Change Resource URL :: Account for DL path change due to URL change ::9.2.1 - 12/13/22 :: Fix TRMM installer (remove powershell needed "-ArgumentList silent", replace with "-silent") ::9.2.0 - 12/12/22 :: Replace Mesh Installers with TRMM Installers :: Add nomachine install @echo off title Brink Setup - v%sVer% ::set "_UCASE=ABCDEFGHIJKLMNOPQRSTUVWXYZ" ::set "_LCASE=abcdefghijklmnopqrstuvwxyz" set "_Username=%USERNAME%" set "_AdminPass=Wardenclyffe1901!" set regadv=REG ::setlocal enabledelayedexpansion goto AdminChecker ::-------------------------------------AdminCheck :AdminChecker net session >nul 2>&1 if %errorLevel% == 0 ( goto Compatible ) else ( cls echo. echo. echo  Please run the setup as Admin!  pause powershell Start-Process -FilePath '%~s0' -Verb RunAs exit /b ) ::-------------------------------------- :Compatible cls ::Check if the script is running on a compatible system >nul (wmic computersystem get model |findstr /i /l /c:"Quest 10" /c:"Quest 7" /c:"2929AZ6" /c:"RB-P101G" /c:"Pulse Ultra J3455" /c:"Atlas" /c:"Quest VIII" /c:"10FLS0A000" /c:"10FLS4NE00")||(goto uWarn) echo. echo  Compatible System  echo. goto CompatibleM :uWarn echo. echo. echo  Incompatible System  echo To bypass warning please type ^"I have been warned^" set "Incompat=" set /p Incompat= if "%Incompat%"=="I have been warned" (goto CompatibleM) else (exit /b) :CompatibleM cls echo. echo. echo Please do NOT run this script on the IT account! timeout 10 ::convert %Username% to lowercase (not needed with /i) ::for /l %%a in (0,1,25) do ( :: call set "_FROM=%%_UCASE:~%%a,1%% :: call set "_TO=%%_LCASE:~%%a,1%% :: call set "_Username=%%_Username:!_FROM!=!_TO!%% ::) if /i "%_Username%"=="IT" (goto CreateBrinkAccount) if /i "%_Username%"=="Anchorhrg" (goto CreateBrinkAccount) if /i "%_Username%"=="Administrator" (goto CreateBrinkAccount) if /i "%_Username%"=="Admin" (goto CreateBrinkAccount) goto SettingsCollection :CreateBrinkAccount cls echo. echo. echo  IT Account Detected!  echo  choice /m " Create new account for Brink?" echo  if %errorlevel% equ 2 (goto ITFail) net user "pos" "pos.0" /fullname:"Brink" /expires:never /add /y net localgroup "Administrators" "pos" /add echo. echo "Brink (pos)" user account created. echo Please sign out and sign back in on the Brink account to run and complete the setup. timeout 15 exit /b :ITFail echo  Brink setup cannot run from the IT account, exiting!  timeout 15 exit /b ::--------------------------------------SettingsCollection :SettingsCollection cls echo. echo  choice /m "Are you setting up a Terminal? (N for Expo)" echo  if %errorlevel% equ 1 (set _expoCheck=0) if %errorlevel% equ 2 (set _expoCheck=1) :SetupLocation cls echo. echo. echo Select Device Location echo. echo 0 / Gregory echo 1 \ Skyline echo 2 / Bowman echo 3 \ North Little Rock echo 4 / Maumelle echo 5 \ Cabot echo 6 / Mabelvale echo 7 \ River Market echo 8 / Bryant echo 9 \ Lewis-Crossing echo 10 / Hot Springs echo 11 \ Jess' echo. set /p _TLocation= SET "var="&for /f "delims=0123456789" %%i in ("%_TLocation%") do set "var=%%i" if defined var (echo %_TLocation% NOT numeric && goto SetupLocation) else (goto SetupLocationZ) :SetupLocationZ if %_TLocation% gtr 11 (goto SetupLocation) if %_TLocation% lss 0 (goto SetupLocation) ::Gregory if %_TLocation% equ 0 (set "_TLocationN=Gregory" && set "_LocationUid=292c3b55-8e7f-4122-84dd-0ae86411660b" && set "_TRMMID=c532a58d-4a9c-45fc-8ac9-be7a023eff72") ::Skyline if %_TLocation% equ 1 (set "_TLocationN=Skyline" && set "_LocationUid=6cdcdea0-85af-45e0-895f-ad59275feda8" && set "_TRMMID=45beef50-1e21-44a9-a113-ba9030d1426d") ::Bowman if %_TLocation% equ 2 (set "_TLocationN=Bowman" && set "_LocationUid=99e1e256-878d-491c-a95d-4dcf3e67dbf9" && set "_TRMMID=e6196e63-1858-44e9-a9bc-191f2ea4da50") ::NorthLittleRock if %_TLocation% equ 3 (set "_TLocationN=NLR" && set "_LocationUid=879b9a2b-6248-4053-b9e7-4e16e584c2c3" && set "_TRMMID=4e48dd42-7968-46f0-b46d-a363e06c6ed7") ::Maumelle if %_TLocation% equ 4 (set "_TLocationN=Maumelle" && set "_LocationUid=531041f8-dbb1-4c8b-ba2c-e081d39e674f" && set "_TRMMID=124647b0-b4e0-43ae-8b54-0ea1eea9f44d") ::Cabot if %_TLocation% equ 5 (set "_TLocationN=Cabot" && set "_LocationUid=56b762dd-afe8-4e97-9698-47946fdbe375" && set "_TRMMID=86059ef4-f11d-4297-95be-5695255e26f2") ::Gateway if %_TLocation% equ 6 (set "_TLocationN=Mabelvale" && set "_LocationUid=0fff63ac-3637-4db7-af75-eeca8dd82863" && set "_TRMMID=969569ef-c87a-49bc-8cee-46ec84526060") ::RiverMarket if %_TLocation% equ 7 (set "_TLocationN=River_Market" && set "_LocationUid=035a2fa4-9c03-4ada-bd07-0cc0e32846e5" && set "_TRMMID=909c7cee-0fba-47d9-a765-94460a16b906") ::Bryant if %_TLocation% equ 8 (set "_TLocationN=Bryant" && set "_LocationUid=0223542d-32d0-44eb-ba03-edb19f7dfacb" && set "_TRMMID=ddaa0d5c-112c-446d-a51d-a9a9bf598082") ::Lewis-Crossing if %_TLocation% equ 9 (set "_TLocationN=Lewis-Crossing" && set "_LocationUid=f0d2ba18-e23d-4284-92d8-afce30faf589" && set "_TRMMID=cc9b7915-b775-48a8-9a44-096c7a7ca34a") ::HotSprings if %_TLocation% equ 10 (set "_TLocationN=Hot_Springs" && set "_LocationUid=e3aef594-1575-41da-b78d-213d7cdd0917" && set "_TRMMID=e0f654d9-9c46-462b-86f6-a44093ea4038") ::Jess' if %_TLocation% equ 11 (set "_TLocationN=Jess" && set "_LocationUid=7a2f3eef-05ee-41ca-aa49-8213cd2a3434" && set "_TRMMID=a4d467fb-456d-42e3-8f4f-79cc6fd6f922") ::------------------------------------Terminal Number :STermNum cls echo. echo. echo Terminal Number ^(1-99^) set /p _TERMNUM= SET "var="&for /f "delims=0123456789" %%i in ("%_TERMNUM%") do set "var=%%i" if defined var (echo %_TERMNUM% NOT numeric && goto STermNum) else (goto STermNumZ) :STermNumZ if %_TERMNUM% gtr 99 (goto STermNum) if %_TERMNUM% lss 0 (goto STermNum) ::------------------------------------IP Address cls echo. echo  choice /m "DHCP IP Configuration? (N for Static IP)" echo  if %errorlevel% equ 1 (set "_IPAssignment=DHCP" && goto VerifyConfSettings) else (set "_IPAssignment=Static") call :strLen _TERMNUM strlen if /I "%strlen%" EQU "1" ( ::echo eq with 1 goto ipone ) if /I "%strlen%" GEQ "2" ( ::echo larger than 1 goto iptwo ) :ipone cls echo. echo. if /I "%_expoCheck%" EQU "0" (echo Terminal IP Address ^(Leave blank for default, 10.%_TLocation%.1.10%_TERMNUM%^)) else (echo IP Address ^(Leave blank for default, 10.%_TLocation%.1.10%_TERMNUM%^)) set "_TERMIP=" set /p _TERMIP= if not defined _TERMIP set "_TERMIP=10.%_TLocation%.1.10%_TERMNUM%" call :checkip _result "%_TERMIP%" if "%_result%" == "False" (goto ipone) goto SSubnet :iptwo cls echo. echo. if /I "%_expoCheck%" EQU "0" (echo Terminal IP Address ^(Leave blank for default, 10.%_TLocation%.1.1%_TERMNUM%^)) else (echo IP Address ^(Leave blank for default, 10.%_TLocation%.1.1%_TERMNUM%^)) echo set "_TERMIP=" set /p _TERMIP= if not defined _TERMIP set "_TERMIP=10.%_TLocation%.1.1%_TERMNUM%" call :checkip _result "%_TERMIP%" if "%_result%" == "False" (goto iptwo) goto SSubnet :SSubnet cls echo. echo. echo Subnet ^(Leave blank for default, 255.255.255.0^) set "_Subnet=" set /p _Subnet= if not defined _Subnet set "_Subnet=255.255.255.0" call :checkip _result "%_Subnet%" if "%_result%" == "False" (goto SSubnet) goto Sgateway :Sgateway cls echo. echo. echo Gateway ^(Leave blank for default, 10.%_TLocation%.1.1^) set "_D_Gate=" set /p _D_Gate= if not defined _D_Gate set "_D_Gate=10.%_TLocation%.1.1" call :checkip _result "%_D_Gate%" if "%_result%" == "False" (goto Sgateway) :VerifyConfSettings ::Padding Spaces - 18 Characters set "spaces= " ::Pad Location set "_TLocationN_PAD=%_TLocationN%" set _TLocationN_PAD=%_TLocationN_PAD%%spaces% set _TLocationN_PAD=%_TLocationN_PAD:~0,18% ::Pad Terminal Number set "_TERMNUM_PAD=%_TERMNUM%" set _TERMNUM_PAD=%_TERMNUM_PAD%%spaces% set _TERMNUM_PAD=%_TERMNUM_PAD:~0,18% ::Pad Device Type if %_expoCheck% equ 0 (set "_DeviceType=Terminal") else (set "_DeviceType=Expo") set "_DeviceType_PAD=%_DeviceType%" set _DeviceType_PAD=%_DeviceType_PAD%%spaces% set _DeviceType_PAD=%_DeviceType_PAD:~0,18% ::Pad IP Assignment set "_IPAssignment_PAD=%_IPAssignment%" set _IPAssignment_PAD=%_IPAssignment_PAD%%spaces% set _IPAssignment_PAD=%_IPAssignment_PAD:~0,18% ::Check if Static IP if "%_IPAssignment%" == "DHCP" (goto PrintSettings) ::Pad IP Address set "_TERMIP_PAD=%_TERMIP%" set _TERMIP_PAD=%_TERMIP_PAD%%spaces% set _TERMIP_PAD=%_TERMIP_PAD:~0,18% ::Pad Subnet set "_Subnet_PAD=%_Subnet%" set _Subnet_PAD=%_Subnet_PAD%%spaces% set _Subnet_PAD=%_Subnet_PAD:~0,18% ::Pad Gateway set "_D_Gate_PAD=%_D_Gate%" set _D_Gate_PAD=%_D_Gate_PAD%%spaces% set _D_Gate_PAD=%_D_Gate_PAD:~0,18% :PrintSettings cls echo. echo. echo 浜様様様様様様様様様様様様様様様様様様様 echo Current Configuration echo 麺様様様様様様様様様様様様様様様様様様様 echo Location %_TLocationN_PAD% echo T # %_TERMNUM_PAD% echo Type %_DeviceType_PAD% echo IP Assignment %_IPAssignment_PAD% if "%_IPAssignment%" == "DHCP" (goto SettingsConfDHCP) echo IP Address %_TERMIP_PAD% echo Subnet %_Subnet_PAD% echo Gateway %_D_Gate_PAD% :SettingsConfDHCP echo 藩様様様様様様様様様様様様様様様様様様様 echo. echo  choice /m "Please verify the above settings are correct..." echo  if %errorlevel% equ 1 (goto IPSettings) if %errorlevel% equ 2 (goto SettingsCollection) ::--------------------------------------ConfigureNetworkSettings :IPSettings cls echo. echo. netsh interface ipv4 show interface ::Step 3 - Rename the Wifi/Ethernet Adapter echo Renaming NIC adapter netsh interface set interface name = "ALOHA" newname = "Brink" netsh interface set interface name = "Wi-Fi" newname = "Brink" netsh interface set interface name = "Ethernet" newname = "Brink" ::Step 4 - Set IPv4 Settings echo Configuring IPv4 address settings... if "%_IPAssignment%" == "DHCP" (netsh interface ip set address "Brink" dhcp) else (netsh interface ip set address "Brink" static %_TERMIP% %_Subnet% %_D_Gate% 1) netsh interface ipv4 set dns "Brink" static 9.9.9.9 netsh interface ipv4 add dns "Brink" 1.1.1.1 index=2 ::Step 5 - Disable IPv6 echo Disabling IPv6... powershell.exe Disable-NetAdapterBinding -Name Brink -ComponentID ms_tcpip6 -PassThru title Brink Setup - v%sVer% ::--------------------------------------AdminCreation :RegAccountPass cls echo. echo. ::Check if admin account exists set /a _AdminCheck=0 net user anchorhrg set /a _AdminCheck=%_AdminCheck% + %ERRORLEVEL% net user it set /a _AdminCheck=%_AdminCheck% + %ERRORLEVEL% if %_AdminCheck% LEQ 2 (echo Admin user exists, continuing...) else ( echo No Admin user found, creating... net user "anchorhrg" "AnchorAdmin501!" /fullname:"IT" /expires:never /add /y net localgroup "Administrators" "anchorhrg" /add echo. echo Admin account added, continuing...) ::--------------------------------------RenameBrinkAccount & Change Password net user %USERNAME% /fullname:"Brink" net user %USERNAME% pos.0 /y ::--------------------------------------AutoLogin cls echo. echo. echo Enabling auto login... echo Username: %USERNAME% %regadv% add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f %regadv% add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d %USERNAME% /f %regadv% add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d pos.0 /f %regadv% DELETE "HKLM\Software\microsoft\Windows NT\CurrentVersion\Winlogon" /v CachedLogonsCount /f ::--------------------------------------InternetPause :InternetPause echo. echo Waiting for Internet Connection... echo. set Itarget=fast.com ping %Itarget% -n 1 | find "TTL=" if errorlevel==0 goto ChocoInstall timeout 5 goto InternetPause ::--------------------------------------ChocoInstall ::Install Chocolatey :ChocoInstall cls echo. echo Installing Chocolatey! powershell.exe Set-ExecutionPolicy AllSigned; Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) title Brink Setup - v%sVer% ::--------------------------------------ChocoRefreshScript echo | set /p dummy="Refreshing environment variables from registry for cmd.exe. Please wait..." goto main :: Set one environment variable from registry key :SetFromReg "%WinDir%\System32\Reg" QUERY "%~1" /v "%~2" > "%TEMP%\_envset.tmp" 2>NUL for /f "usebackq skip=2 tokens=2,*" %%A IN ("%TEMP%\_envset.tmp") do ( echo/set "%~3=%%B" ) goto :EOF :: Get a list of environment variables from registry :GetRegEnv "%WinDir%\System32\Reg" QUERY "%~1" > "%TEMP%\_envget.tmp" for /f "usebackq skip=2" %%A IN ("%TEMP%\_envget.tmp") do ( if /I not "%%~A"=="Path" ( call :SetFromReg "%~1" "%%~A" "%%~A" ) ) goto :EOF :main echo/@echo off >"%TEMP%\_env.cmd" :: Slowly generating final file call :GetRegEnv "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" >> "%TEMP%\_env.cmd" call :GetRegEnv "HKCU\Environment">>"%TEMP%\_env.cmd" >> "%TEMP%\_env.cmd" :: Special handling for PATH - mix both User and System call :SetFromReg "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" Path Path_HKLM >> "%TEMP%\_env.cmd" call :SetFromReg "HKCU\Environment" Path Path_HKCU >> "%TEMP%\_env.cmd" :: Caution: do not insert space-chars before >> redirection sign echo/set "Path=%%Path_HKLM%%;%%Path_HKCU%%" >> "%TEMP%\_env.cmd" :: Cleanup del /f /q "%TEMP%\_envset.tmp" 2>nul del /f /q "%TEMP%\_envget.tmp" 2>nul :: capture user / architecture SET "OriginalUserName=%USERNAME%" SET "OriginalArchitecture=%PROCESSOR_ARCHITECTURE%" :: Set these variables call "%TEMP%\_env.cmd" :: Cleanup del /f /q "%TEMP%\_env.cmd" 2>nul :: reset user / architecture SET "USERNAME=%OriginalUserName%" SET "PROCESSOR_ARCHITECTURE=%OriginalArchitecture%" echo | set /p dummy="Finished." echo . ::-------------------------------------- ::Step 6.1 - Disable Task View, People, News and Interests Screen Rotation; Show Touch Keyboard cls echo. echo. echo Modifying Explorer ^| Registry Edits... echo. %regadv% ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v PeopleBand /t REG_DWORD /d 0 /f echo ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v PeopleBand %regadv% DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MultiTaskingView\AllUpView" /V Enabled /F echo DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MultiTaskingView\AllUpView" /v Enabled %regadv% ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V ShowTaskViewButton /T REG_DWORD /D 0 /F echo ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowTaskViewButton %regadv% ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Feeds" /V ShellFeedsTaskbarViewMode /T REG_DWORD /D 2 /F echo ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Feeds" /v ShellFeedsTaskbarViewMode %regadv% ADD "HKCU\SOFTWARE\Microsoft\TabletTip\1.7" /V TipbandDesiredVisibility /T REG_DWORD /D 1 /F echo ADD "HKCU\SOFTWARE\Microsoft\TabletTip\1.7" /v TipbandDesiredVisibility %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AutoRotation" /v "Enable" /t REG_DWORD /d 0 /F echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AutoRotation" /v "Enable" ::--------------------------------------Download/Install Chromium, wget cls echo. echo. echo Installing Chromium... choco install chromium -y --ignore-checksums echo. echo Installing wget... choco install wget -y --ignore-checksums echo. echo Installing nomachine... choco install nomachine -y --ignore-checksums ::--------------------------------------DownloadResources cls echo. echo. echo Downloading terminal resources... cd %userprofile%\AppData\Local\Temp wget -r -np -R "index.html*" -nH -e robots=off -l 10 https://static.anchorhrg.com/.termInstall-OLD/.TermInstaller/Resources/ move /y %userprofile%\AppData\Local\Temp\.termInstall-OLD\.TermInstaller %userprofile%\AppData\Local\Temp\.TermInstaller cd %userprofile%\AppData\Local\Temp\.TermInstaller ::--------------------------------------InstallPreReqs cls echo. echo. echo Installing PreReqs... echo. cd "%userprofile%\AppData\Local\Temp\.TermInstaller\Resources\Brink\" echo Installing 32bit Database Silently... SSCERuntime_x86-ENU.msi /quiet echo Upgrading Database to 64bit Silently... SSCERuntime_x64-ENU.msi /quiet move /y TerminalConfig.lnk %HOMEPATH%\Desktop\TerminalConfig.lnk if /I "%_expoCheck%" EQU "1" (goto SkipRainmeter) echo. echo Moving Rainmeter Files... move /y %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\rainmeter\C\Refresh.bat C:\Refresh.bat move /y %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\rainmeter\C\Refresh.lnk C:\Refresh.lnk robocopy %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\rainmeter\Documents\Rainmeter\ "%HOMEPATH%\Documents\Rainmeter" /s /move echo PreScanning Refresh... powershell Start-MpScan -ScanType CustomScan -ScanPath C:\Refresh.bat title Brink Setup - v%sVer% echo. echo Installing Rainmeter Silently... ::echo Please click through installer, don't change any settings! cd "%userprofile%\AppData\Local\Temp\.TermInstaller\Resources\rainmeter\" if /I "%_expoCheck%" EQU "0" (Rainmeter.exe /S) taskkill /f /im Rainmeter.exe robocopy %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\rainmeter\AppData\Rainmeter\ "%appdata%\Rainmeter" /s /move powershell Start-Process -FilePath 'C:\Program Files\Rainmeter\Rainmeter.exe' title Brink Setup - v%sVer% :SkipRainmeter cd %userprofile%\AppData\Local\Temp\.TermInstaller ::-------------------------------------- ::Add Explorer to Desktop cls echo. echo. echo Adding Explorer shortcut to desktop... echo. echo Set oWS = WScript.CreateObject("WScript.Shell") > %userprofile%\AppData\Local\Temp\.TermInstaller\CreateShortcut.vbs echo sLinkFile = "%userprofile%\AppData\Local\Temp\.TermInstaller\explorer.lnk" >> %userprofile%\AppData\Local\Temp\.TermInstaller\CreateShortcut.vbs echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %userprofile%\AppData\Local\Temp\.TermInstaller\CreateShortcut.vbs echo oLink.TargetPath = "C:\Windows\explorer.exe" >> %userprofile%\AppData\Local\Temp\.TermInstaller\CreateShortcut.vbs echo oLink.Save >> %userprofile%\AppData\Local\Temp\.TermInstaller\CreateShortcut.vbs cscript %userprofile%\AppData\Local\Temp\.TermInstaller\CreateShortcut.vbs del %userprofile%\AppData\Local\Temp\.TermInstaller\CreateShortcut.vbs copy "%userprofile%\AppData\Local\Temp\.TermInstaller\explorer.lnk" "%HOMEPATH%\Desktop\explorer.lnk" ::-------------------------------------- ::Step 6.2 - Disable Flow Control and Power Management on network adapter, Change Roaming Sensitivity cls echo. echo. echo Modifying additional NIC adapter settings... echo (These may fail, that's fine!) echo. powershell.exe Set-NetAdapterAdvancedProperty -Name Brink -RegistryKeyword '*Flo*rol' -RegistryValue 'Disable' powershell.exe Set-NetAdapterAdvancedProperty Brink -DisplayName Roam* -DisplayValue High powershell.exe Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass; %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\powerManagement.ps1 title Brink Setup - v%sVer% ::-------------------------------------- ::Step 7 - Registry Edits cls echo. echo. echo More Registry edits... echo. ::Disable UAC %regadv% ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 0 /f echo ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" ::powershell.exe Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 0 %regadv% ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "SecureProtocols" /t REG_DWORD /d 2048 /f echo ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "SecureProtocols" %regadv% ADD "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters" /v "autodisconnect" /t REG_DWORD /d 4294967295 /f echo ADD "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters" /v "autodisconnect" echo. ::echo Registry Editing Done ::--------------------------------------Step 8 was Aloha only ::Step 9 - Disable Sharing Wizard cls echo. echo. echo Disabling Sharing Wizard... %regadv% ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /t REG_DWORD /v SharingWizardOn /d 0 /f ::Step 10 - Set Firewall (Brink) Disable Firewall (Aloha) https://www.tenforums.com/tutorials/70699-turn-off-windows-defender-firewall-windows-10-a.html cls echo. echo. echo Modifying Firewall settings... cd %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\Brink\ netsh advfirewall import BrinkFirewall.csv cd %userprofile%\AppData\Local\Temp\.TermInstaller ::--------------------------------------Step 11 was Aloha only ::Step 12 - Power Settings https://community.spiceworks.com/topic/2155399-powercfg-batch-file-help cls echo. echo. echo Modifying power settings... powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c powercfg -setacvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 000 powercfg -SETDCVALUEINDEX SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 000 powercfg -setacvalueindex SCHEME_CURRENT 238c9fa8-0aad-41ed-83f4-97be242c8f20 29f6c1db-86da-48c5-9fdb-f2b67b1f44da 000 powercfg -SETDCVALUEINDEX SCHEME_CURRENT 238c9fa8-0aad-41ed-83f4-97be242c8f20 29f6c1db-86da-48c5-9fdb-f2b67b1f44da 000 powercfg -setacvalueindex SCHEME_CURRENT 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 000 powercfg -SETDCVALUEINDEX SCHEME_CURRENT 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 000 powercfg -SetActive SCHEME_CURRENT powercfg -setacvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 0 powercfg -SetActive SCHEME_CURRENT ::-------------------------------------- ::Step 13 - Disable/Change Update Service cls echo. echo. echo Modifying Update Service settings... %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursEnd" /t REG_DWORD /d 0 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursEnd" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursStart" /t REG_DWORD /d 7 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "ActiveHoursStart" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "SetActiveHours" /t REG_DWORD /d 1 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "SetActiveHours" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "SetAutoRestartNotificationDisable" /t REG_DWORD /d 1 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "SetAutoRestartNotificationDisable" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AUOptions" /t REG_DWORD /d 3 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AUOptions" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AutoInstallMinorUpdates" /t REG_DWORD /d 0 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AutoInstallMinorUpdates" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AutomaticMaintenanceEnabled" /t REG_DWORD /d 1 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AutomaticMaintenanceEnabled" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "DetectionFrequency" /t REG_DWORD /d 22 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "DetectionFrequency" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "DetectionFrequencyEnabled" /t REG_DWORD /d 1 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "DetectionFrequencyEnabled" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "NoAUShutdownOption" /t REG_DWORD /d 1 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "NoAUShutdownOption" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "NoAutoRebootWithLoggedOnUsers" /t REG_DWORD /d 1 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "NoAutoRebootWithLoggedOnUsers" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "NoAutoUpdate" /t REG_DWORD /d 0 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "NoAutoUpdate" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallDay" /t REG_DWORD /d 0 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallDay" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallEveryWeek" /t REG_DWORD /d 1 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallEveryWeek" %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallTime" /t REG_DWORD /d 2 /f echo ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallTime" ::powershell.exe Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate -Name DisableWindowsUpdateAccess -Value 1 ::powershell.exe Set-Service W32Time -StartupType Disabled ::powershell.exe Stop-Service title Brink Setup - v%sVer% ::--------------------------------------Step 14.1 was Aloha only ::Step 14.2 - Paging File https://social.technet.microsoft.com/Forums/windows/en-US/708da424-3a7c-404d-8f54-f989ed62d323/command-for-changeing-the-page-file?forum=winservercore cls echo. echo. echo Setting Paging File size... wmic computersystem where name="%computername%" set AutomaticManagedPagefile=False wmic pagefileset where name=C:\\pagefile.sys set InitialSize=6144,MaximumSize=10240 %regadv% add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v PagingFiles /t REG_MULTI_SZ /d "c:\pagefile.sys 6144 10240" /f wmic pagefileset wmic pagefileset list /format:list wmic pagefile list /format:list title Brink Setup - v%sVer% echo. echo Pagefile size should be changed upon restart! timeout 3 ::-------------------------------------- ::Step 16 - Mesh - %userprofile%\AppData\Local\Temp\.TermInstaller\ cls echo. echo. ::echo Downloading MeshCentral... ::wget https://static.anchorhrg.com/.mesh/DBAgentv264-%_TLocationN%.exe ::DBAgentv264-%_TLocationN%.exe -fullinstall ::echo MeshCentral Installed! echo Downloading & Installing TRMM... wget https://api.anchorhrg.com/clients/%_TRMMID%/deploy/ -O C:\TRMM.exe C:\TRMM.exe -silent echo TRMM Installed! title Brink Setup - v%sVer% ::-------------------------------------- ::Step 17 - Disable Edge Swipe and Increase Log Size, Disable Tablet Mode cls echo. echo. echo Disabling Edge Swipe... %regadv% ADD "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EdgeUI" /v "AllowEdgeSwipe" /t REG_DWORD /d 0 /f echo Increasing Log Size... %regadv% ADD "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Security" /v "MaxSize" /t REG_DWORD /d 419420 /f echo Disabling Tablet Mode... %regadv% ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" /v "TabletMode" /t REG_DWORD /d 0 /f %regadv% ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" /v "SignInMode" /t REG_DWORD /d 1 /f %regadv% ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" /v "ConvertibleSlateModePromptPreference" /t REG_DWORD /d 0 /f ::-------------------------------------- ::Step 18 - Workgroup and Computer Name https://winaero.com/blog/change-workgroup-name-windows-10/ https://stackoverflow.com/questions/40311007/change-windows-computer-name-bat-file cls echo. echo. echo Changing Workgroup and Computer name... wmic computersystem where name="%computername%" call joindomainorworkgroup name="%_TLocationN%" if /I "%_expoCheck%" EQU "0" (powershell.exe Rename-Computer -NewName TERM%_TERMNUM%) else (powershell.exe Rename-Computer -NewName Expo%_TERMNUM%) echo Name should be changed upon restart! title Brink Setup - v%sVer% ::-------------------------------------- ::Step 19 - Set Wallpaper cls echo. echo. echo Setting Wallpaper... ::robocopy %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\burgers.jpg "C:\Users\Public\Pictures\burgers.jpg" /s /move cd C:\Users\Public\Pictures\ curl -O https://static.anchorhrg.com/.termInstall-OLD/.TermInstaller/Resources/burgers.jpg timeout 2 powershell.exe Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass; %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\setWallpaper.ps1 cd %userprofile%\AppData\Local\Temp\.TermInstaller title Brink Setup - v%sVer% ::-------------------------------------- ::Step 23 - Share C Drive cls echo. echo. echo Sharing drives... NET SHARE TRoot=C:\ /GRANT:pos,Full NET SHARE TRootAnchor=C:\ /GRANT:anchorhrg,Full %regadv% add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f ::-------------------------------------- ::Step 24 - Screen Res. and Rotate Lock cls echo. echo. echo Adjusting resolution and screen lock settings... cd %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\ if /I "%_expoCheck%" EQU "1" (goto skipRes) ::If Location is 11 (Jess') skip resolution settings ::if /I "%_TLocation%" NEQ "11" (QRes.exe /x:1024 /y:768) :skipRes cd %userprofile%\AppData\Local\Temp\.TermInstaller %regadv% ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AutoRotation" /v "Enable" /t REG_DWORD /d 0 /f title Brink Setup - v%sVer% ::-------------------------------------- :BrinkInstall cls echo. echo. echo Launching Brink installer! cd %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\Brink\ if /I "%_expoCheck%" EQU "0" (Register.msi) else (Kitchen.msi) echo. echo. echo Brink Installed! echo Installing Start Delay Silently... echo Make sure to add Brink and activate after installation! cd %userprofile%\AppData\Local\Temp\.TermInstaller\Resources startdelay_v2.5b138.exe /S timeout 10 powershell Start-Process -FilePath 'C:\Program Files (x86)\r2 Studios\Startup Delayer\Startup Delayer.exe' title Brink Setup - v%sVer% echo. echo Make sure to restart the computer once this window closes! echo Writing .cfg file after countdown... timeout 5 goto Finalize ::-------------------------------------- :Finalize cd %userprofile%\AppData\Local\Temp\.TermInstaller\Resources\ cls echo. echo. echo Moving StartDelay installer to %HOMEPATH%\Desktop\Tech\ move /y startdelay_v2.5b138.exe %HOMEPATH%\Desktop\Tech\startdelay_v2.5b138.exe :CleanUp cls echo. echo. echo Relocating .TermInstaller Folder robocopy %userprofile%\AppData\Local\Temp\.TermInstaller\ %HOMEPATH%\Desktop\Tech\.TermInstaller /s /move echo. echo DONE echo. goto CFGWrite :CFGWrite cls echo. echo. echo Writing .cfg if /I "%_expoCheck%" EQU "0" (set _cfgFile=Register) else (set _cfgFile=Kitchen) if /I "%_TERMNUM%" EQU "1" (set _mainAddress=app20.brinkpos.net) else (set _mainAddress=10.%_TLocation%.1.101) >C:\Brink\Pos\%_cfgFile%.cfg echo ^ if /I "%_expoCheck%" EQU "0" (>>C:\Brink\Pos\%_cfgFile%.cfg echo ^) else (>>C:\Brink\Pos\%_cfgFile%.cfg echo ^) >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ if /I "%_expoCheck%" EQU "0" ( >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ ) >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ if /I "%_expoCheck%" EQU "0" ( >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ ) >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ >>C:\Brink\Pos\%_cfgFile%.cfg echo ^ goto :eof ::endlocal :strLen setlocal EnableExtensions enabledelayedexpansion :strLen_Loop if not "!%1:~%len%!"=="" set /A len+=1 & goto :strLen_Loop (endlocal & set %2=%len%) goto :eof :checkip setlocal set _var=%1 set _ip=%~2 set _prefixlenght=%_ip:*/=% call set _ip=%%_ip:/%_prefixlenght%=%% for /F "usebackq tokens=*" %%g in (`powershell -c "$ipaddrobj = [ipaddress]::Any ; if (!([ipaddress]::TryParse('%_ip%', [ref]$ipaddrobj))){if (!([ipaddress]::TryParse('%_ip%'.split(':')[0], [ref]$ipaddrobj))){return $false}} ; return $true"`) do (set _ipvalid=%%g) endlocal & set %_var%=%_ipvalid% goto :eof