install.bat: disable all notifications machine-wide + add game-data shares
- Notifications: replace per-user HKCU tweaks (which only hit the admin running the installer) with machine-wide HKLM Group Policy keys so they apply to the auto-login kiosk account — no toasts, lock-screen notifications, cloud toasts, tips/Spotlight/consumer content, or Defender health alerts. - Shares (closed network): create C:\mw4files and share it as \host\mw4files, and share C:\ as \host\c, both granted to Everyone. Idempotent (delete-then- create); C:\mw4files also gets Everyone modify on NTFS so the grant is usable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+39
-14
@@ -157,6 +157,19 @@ echo Enabling SMB1 file sharing...
|
|||||||
dism /Online /Enable-Feature /FeatureName:SMB1Protocol /All /NoRestart >nul 2>&1
|
dism /Online /Enable-Feature /FeatureName:SMB1Protocol /All /NoRestart >nul 2>&1
|
||||||
echo SMB1 enabled (reboot required to take effect).
|
echo SMB1 enabled (reboot required to take effect).
|
||||||
|
|
||||||
|
:: Create and share game-data folders (closed network — open to Everyone).
|
||||||
|
echo Creating network shares...
|
||||||
|
if not exist "C:\mw4files" mkdir "C:\mw4files"
|
||||||
|
:: Grant Everyone modify on the NTFS side so the share grant is effective.
|
||||||
|
icacls "C:\mw4files" /grant *S-1-1-0:(OI)(CI)M /T >nul 2>&1
|
||||||
|
:: Recreate shares idempotently (net share fails if the name already exists).
|
||||||
|
net share mw4files /delete >nul 2>&1
|
||||||
|
net share mw4files=C:\mw4files /grant:Everyone,FULL >nul 2>&1
|
||||||
|
echo Share \\%COMPUTERNAME%\mw4files -> C:\mw4files (Everyone: Full)
|
||||||
|
net share c /delete >nul 2>&1
|
||||||
|
net share c=C:\ /grant:Everyone,FULL >nul 2>&1
|
||||||
|
echo Share \\%COMPUTERNAME%\c -> C:\ (Everyone: Full)
|
||||||
|
|
||||||
:: Enable DirectPlay (required by older games)
|
:: Enable DirectPlay (required by older games)
|
||||||
echo Enabling DirectPlay...
|
echo Enabling DirectPlay...
|
||||||
dism /Online /Enable-Feature /FeatureName:DirectPlay /All /NoRestart >nul 2>&1
|
dism /Online /Enable-Feature /FeatureName:DirectPlay /All /NoRestart >nul 2>&1
|
||||||
@@ -221,22 +234,34 @@ echo Sleep, hibernate, monitor timeout, and disk timeout disabled.
|
|||||||
:: ── STEP 6: Disable notifications ───────────────────────────────────────────
|
:: ── STEP 6: Disable notifications ───────────────────────────────────────────
|
||||||
echo.
|
echo.
|
||||||
echo [6/8] Disabling notifications...
|
echo [6/8] Disabling notifications...
|
||||||
|
:: These are machine-wide Group Policy keys (HKLM) so they apply to EVERY user,
|
||||||
|
:: including the auto-login kiosk account. Per-user HKCU tweaks would only touch
|
||||||
|
:: the admin running this installer, not the account the pod actually runs as.
|
||||||
|
|
||||||
:: Disable Action Center / notification center
|
:: Remove Action Center / Notification Center entirely
|
||||||
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" ^
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" ^
|
||||||
/v DisableNotificationCenter /t REG_DWORD /d 1 /f >nul
|
/v DisableNotificationCenter /t REG_DWORD /d 1 /f >nul
|
||||||
:: Disable toast notifications
|
|
||||||
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" ^
|
:: Kill all toast/app notifications (desktop and lock screen) and cloud toasts
|
||||||
/v ToastEnabled /t REG_DWORD /d 0 /f >nul
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" ^
|
||||||
:: Disable Windows tips and suggestions
|
/v NoToastApplicationNotification /t REG_DWORD /d 1 /f >nul
|
||||||
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" ^
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" ^
|
||||||
/v SubscribedContent-338389Enabled /t REG_DWORD /d 0 /f >nul
|
/v NoToastApplicationNotificationOnLockScreen /t REG_DWORD /d 1 /f >nul
|
||||||
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" ^
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" ^
|
||||||
/v SubscribedContent-310093Enabled /t REG_DWORD /d 0 /f >nul
|
/v NoCloudApplicationNotification /t REG_DWORD /d 1 /f >nul
|
||||||
:: Disable "Get tips, tricks, and suggestions"
|
|
||||||
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" ^
|
:: Suppress tips, suggestions, Spotlight, and other consumer content pop-ups
|
||||||
/v SoftLandingEnabled /t REG_DWORD /d 0 /f >nul
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" ^
|
||||||
echo Notifications and tips disabled.
|
/v DisableSoftLanding /t REG_DWORD /d 1 /f >nul
|
||||||
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" ^
|
||||||
|
/v DisableWindowsSpotlightFeatures /t REG_DWORD /d 1 /f >nul
|
||||||
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" ^
|
||||||
|
/v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f >nul
|
||||||
|
|
||||||
|
:: Silence Security & Maintenance (formerly Action Center) health notifications
|
||||||
|
reg add "HKLM\SOFTWARE\Microsoft\Windows Defender Security Center\Notifications" ^
|
||||||
|
/v DisableNotifications /t REG_DWORD /d 1 /f >nul
|
||||||
|
echo All Windows notifications disabled (machine-wide).
|
||||||
|
|
||||||
:: ── STEP 7: Disable UAC ─────────────────────────────────────────────────────
|
:: ── STEP 7: Disable UAC ─────────────────────────────────────────────────────
|
||||||
echo.
|
echo.
|
||||||
|
|||||||
Reference in New Issue
Block a user