hosts/hosts_install_win.bat
vdbhb59 19d453b066 Corrupted repo recreated
Something broke the whole repo, and now my commits are gone too it seems.
2025-07-27 16:57:28 +05:30

32 lines
630 B
Batchfile

:: Author: @vdbhb59, @FLOSSbOxIN @FbIN
:: License: MIT, https://opensource.org/licenses/
:: This script needs administrator privileges.
:: WARNING: consider disabling "DNS Client" service if your machine slows down.
@echo off
set "source=%~dp0hosts"
set "target=%windir%\System32\drivers\etc\hosts"
echo.
echo ==================
echo # @FLOSSbOxIN #
echo ==================
echo.
if exist "%source%" (
if exist "%target%" (
attrib -r -s -h "%target%" > nul
)
copy /y "%source%" "%target%" > nul
attrib +r "%target%" > nul
) else (
echo Error, source file not found.
)
echo Execution finished.
echo.
pause