From ef4094039a90ecdc8f0402e63aff881ce79bf30f Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 3 Sep 2026 12:35:45 +0200 Subject: [PATCH] feat: Disable Autoplay on Windows Vista and 7 (#2211) --- assets/win2008r2.cmd | 3 +++ assets/win7x64-enterprise.cmd | 3 +++ assets/win7x64-ultimate.cmd | 3 +++ assets/win7x64.cmd | 3 +++ assets/win7x86-enterprise.cmd | 3 +++ assets/win7x86-ultimate.cmd | 3 +++ assets/win7x86.cmd | 3 +++ assets/winvistax64-enterprise.cmd | 3 +++ assets/winvistax64-ultimate.cmd | 3 +++ assets/winvistax64.cmd | 3 +++ assets/winvistax86-enterprise.cmd | 3 +++ assets/winvistax86-ultimate.cmd | 3 +++ assets/winvistax86.cmd | 3 +++ 13 files changed, 39 insertions(+) diff --git a/assets/win2008r2.cmd b/assets/win2008r2.cmd index 59cca277..e6870599 100644 --- a/assets/win2008r2.cmd +++ b/assets/win2008r2.cmd @@ -44,6 +44,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/win7x64-enterprise.cmd b/assets/win7x64-enterprise.cmd index 74bd7491..2ea592f6 100644 --- a/assets/win7x64-enterprise.cmd +++ b/assets/win7x64-enterprise.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/win7x64-ultimate.cmd b/assets/win7x64-ultimate.cmd index 74bd7491..2ea592f6 100644 --- a/assets/win7x64-ultimate.cmd +++ b/assets/win7x64-ultimate.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/win7x64.cmd b/assets/win7x64.cmd index 74bd7491..2ea592f6 100644 --- a/assets/win7x64.cmd +++ b/assets/win7x64.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/win7x86-enterprise.cmd b/assets/win7x86-enterprise.cmd index 74bd7491..85006129 100644 --- a/assets/win7x86-enterprise.cmd +++ b/assets/win7x86-enterprise.cmd @@ -41,6 +41,9 @@ reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNe rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable hibernation in the registry. reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateFileSizePercent" /t REG_DWORD /d 0 /f diff --git a/assets/win7x86-ultimate.cmd b/assets/win7x86-ultimate.cmd index 74bd7491..2ea592f6 100644 --- a/assets/win7x86-ultimate.cmd +++ b/assets/win7x86-ultimate.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/win7x86.cmd b/assets/win7x86.cmd index 74bd7491..2ea592f6 100644 --- a/assets/win7x86.cmd +++ b/assets/win7x86.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/winvistax64-enterprise.cmd b/assets/winvistax64-enterprise.cmd index 0f8d96d7..c2d9c52b 100644 --- a/assets/winvistax64-enterprise.cmd +++ b/assets/winvistax64-enterprise.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/winvistax64-ultimate.cmd b/assets/winvistax64-ultimate.cmd index 0f8d96d7..c2d9c52b 100644 --- a/assets/winvistax64-ultimate.cmd +++ b/assets/winvistax64-ultimate.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/winvistax64.cmd b/assets/winvistax64.cmd index 0f8d96d7..c2d9c52b 100644 --- a/assets/winvistax64.cmd +++ b/assets/winvistax64.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/winvistax86-enterprise.cmd b/assets/winvistax86-enterprise.cmd index 0f8d96d7..c2d9c52b 100644 --- a/assets/winvistax86-enterprise.cmd +++ b/assets/winvistax86-enterprise.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/winvistax86-ultimate.cmd b/assets/winvistax86-ultimate.cmd index 0f8d96d7..c2d9c52b 100644 --- a/assets/winvistax86-ultimate.cmd +++ b/assets/winvistax86-ultimate.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f diff --git a/assets/winvistax86.cmd b/assets/winvistax86.cmd index 0f8d96d7..c2d9c52b 100644 --- a/assets/winvistax86.cmd +++ b/assets/winvistax86.cmd @@ -38,6 +38,9 @@ reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard rem Disable Network Discovery popup. reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f +rem Disable AutoPlay for all drives. +reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f + rem Disable first-run experience in Edge. reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f