@echo off @title Ungoogled Chromium downloader + configer ^| ver.1.0 [23.04.2023] @cd /d "%~dp0" @for /f eol^=-^ tokens^=1-26^ delims^=^<^>^" %%a in ('@curl.exe -lsL "https://github.com/macchrome/winchrome/releases/latest" ^| @FINDSTR /IRC:"href.*ungoogled-chromium.*Win64.7z"') do (@set DefVerUngCr=%%b) @curl.exe -RLO# "%DefVerUngCr%" @curl.exe -RLO# "https://www.7-zip.org/a/7zr.exe" @FOR /F "tokens=1" %%i in ('dir "ungoogled-chromium*Win64.7z" /b') do (@set DefVerUngCrFile=%%i) @"7zr.exe" x -bso0 -aoa "%DefVerUngCrFile%" -xr!chrome_pwa_launcher.exe -xr!chromedriver.exe -xr!notification_helper.exe -xr!VisualElements @del /f /q "7zr.exe" "%DefVerUngCrFile%" for /f "delims=" %%i in ('2^>nul dir /b /a:d ung*') do set "ung=%%i" for /f "delims=" %%i in ('2^>nul dir /b ^| findstr /rv "%~nx0 %ung% User.Data"') do ( rd /s /q "%%i" >nul 2>^&1 || del /f /q "%%i" ) robocopy %ung% . /E rd /s /q "%ung%" @echo Done! @pause > nul |