自動再生機能をオフにする のレジストリ値 NoDriveTypeAutoRunユーザーHKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
- ポリシー ID
- Autorun
- 適用対象
- コンピューターの構成、ユーザーの構成
- サポートされるバージョン
- Windows 2000 以降
- 出典
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (バージョン 1.0)
- カテゴリ
- Windows コンポーネント › 自動再生のポリシー
レジストリ
NoDriveTypeAutoRun
REG_DWORDユーザーコンピューター…\Software\Microsoft\Windows\CurrentVersion\Policies\ExplorerHKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer 現在のキー
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
- 有効時の値
- オプションの値に依存
- 要素
- 自動再生機能をオフにする:
| 項目 | 保存される値 |
|---|---|
| CD-ROM とリムーバブル メディア ドライブ | 181 |
| すべてのドライブ | 255 |
.reg · CMD · PowerShell で適用する
ユーザーアカウントごとの設定
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] ; 選択項目 (1 つだけ使用) ; CD-ROM とリムーバブル メディア ドライブ "NoDriveTypeAutoRun"=dword:000000b5 ; すべてのドライブ "NoDriveTypeAutoRun"=dword:000000ff
CMD
:: 選択項目 (1 つだけ使用) :: CD-ROM とリムーバブル メディア ドライブ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 181 /f :: すべてのドライブ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f
PowerShell
# 共通: キーを作成 New-Item -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Force | Out-Null # 選択項目 (1 つだけ使用) # CD-ROM とリムーバブル メディア ドライブ New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoDriveTypeAutoRun' -PropertyType DWord -Value 181 -Force | Out-Null # すべてのドライブ New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoDriveTypeAutoRun' -PropertyType DWord -Value 255 -Force | Out-Null
コンピューターコンピューター全体の設定
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] ; 選択項目 (1 つだけ使用) ; CD-ROM とリムーバブル メディア ドライブ "NoDriveTypeAutoRun"=dword:000000b5 ; すべてのドライブ "NoDriveTypeAutoRun"=dword:000000ff
CMD
:: 選択項目 (1 つだけ使用) :: CD-ROM とリムーバブル メディア ドライブ reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 181 /f :: すべてのドライブ reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f
PowerShell
# 共通: キーを作成 New-Item -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Force | Out-Null # 選択項目 (1 つだけ使用) # CD-ROM とリムーバブル メディア ドライブ New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoDriveTypeAutoRun' -PropertyType DWord -Value 181 -Force | Out-Null # すべてのドライブ New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoDriveTypeAutoRun' -PropertyType DWord -Value 255 -Force | Out-Null