@echo off
TITLE Prevent Chromium 'Unsupported OS' browser message
cls
color 1f
echo.

Set "BOSBuildVer=99"
for /f "tokens=6 delims=[]. " %%O in ('ver') do set "BOSBuildVer=%%O"
IF NOT DEFINED BOSBuildVer Set "BOSBuildVer=99"
IF %BOSBuildVer% GTR 9700 GOTO :WrongOS

TITLE Checking for Admin...
echo.
cd %systemroot%\system32
call :IsAdmin

:StartScript
TITLE Prevent Chromium 'Unsupported OS' browser message
cls
color 1f
echo.

echo Updating registry...

Reg add "HKLM\SOFTWARE\Policies\Chromium" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d "1" /f >nul 2>&1
Reg add "HKLM\Software\Policies\Google\Chrome" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d "1" /f >nul 2>&1
Reg add "HKLM\Software\Policies\Google\Update" /v "UpdateDefault" /t REG_DWORD /d "0" /f >nul 2>&1
Reg add "HKLM\Software\Policies\Google\Update" /v "AutoUpdateCheckPeriodMinutes" /t REG_DWORD /d "0" /f >nul 2>&1
Reg add "HKLM\Software\Policies\BraveSoftware\Brave" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d "1" /f >nul 2>&1
Reg add "HKLM\Software\Policies\Microsoft\Edge" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d "1" /f >nul 2>&1
Reg add "HKLM\Software\Policies\Vivaldi" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d "1" /f >nul 2>&1

Reg add "HKCU\SOFTWARE\Policies\Chromium" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d "1" /f >nul 2>&1
Reg add "HKCU\Software\Policies\Google\Chrome" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d "1" /f >nul 2>&1
Reg add "HKCU\Software\Policies\Google\Update" /v "UpdateDefault" /t REG_DWORD /d "0" /f >nul 2>&1
Reg add "HKCU\Software\Policies\Google\Update" /v "AutoUpdateCheckPeriodMinutes" /t REG_DWORD /d "0" /f >nul 2>&1
Reg add "HKCU\Software\Policies\BraveSoftware\Brave" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d "1" /f >nul 2>&1
Reg add "HKCU\Software\Policies\Microsoft\Edge" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d "1" /f >nul 2>&1
Reg add "HKCU\Software\Policies\Vivaldi" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d "1" /f >nul 2>&1

:DoneScript
echo.
echo Completed - script ended.

:Done
echo.
Pause
exit

:WrongOS
echo This OS build does not require this tweak.
GOTO :Done

=====================================================================================
:IsAdmin
Reg query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
 Cls & echo. & Echo You must have administrator rights to continue ... & echo.
 Pause & Exit
)
Cls

exit /b
