@echo off

:CheckOS
IF EXIST "%WINDIR%\SystemApps" (GOTO Win1011only) ELSE (GOTO continue)

:Win1011only

:: 추천 앱 설치 사용안함 W10 W11
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsSpotlightFeatures" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableThirdPartySuggestions" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableTailoredExperiencesWithDiagnosticData" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableSoftLanding" /t REG_DWORD /d "1" /f

:: 버전1903 부터 생긴 '예약된 저장소' 생성 방지
for /f "tokens=3 delims=.]" %%a in ('ver') do set build=%%a
if %build% GEQ 18362 (reg add HKLM\Software\Microsoft\Windows\CurrentVersion\ReserveManager /v ShippedWithReserves /t reg_dword  /d 0 /f)




goto continue



:continue

::YMtech reg환경설정
cd /d "%~dp0" && call ymtechadd.cmd
cls

:: 윈도우 인증: 7/8은 Online KMS, 10 ltsc는 KMS38(2038년까지 인증), 나머지 10은 영구인증, 10 서버 계열은 Online KMS
cd /d "%~dp0" && call WindowsAct.cmd
cls

:: 오피스 retail to volume
cd /d "%~dp0" && call Office_R2V.cmd
cls

:: 윈도우/오피스 인증
cd /d "%~dp0" && call OnlineKMS.cmd
cls

:: 이지드라이버 셋업
cd /d "%~dp0" && call EasyDrvSetup.cmd
cls


exit
