[マイ コンピューター] からドライブにアクセスできないようにする のレジストリ値 NoViewOnDriveユーザーHKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

ポリシー ID
NoViewOnDrive
適用対象
ユーザーの構成
サポートされるバージョン
Windows 2000 以降
出典
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (バージョン 1.0)
カテゴリ
Windows コンポーネント › エクスプローラー

レジストリ

NoViewOnDrive

REG_DWORDユーザー
有効時の値
オプションの値に依存
要素
次の組み合わせの中から 1 つ選んでください:
オプション
項目保存される値
A および B ドライブのみを制限する3
C ドライブのみを制限する4
D ドライブのみを制限する8
A、B および C ドライブのみを制限する7
A、B、C および D ドライブのみを制限する15
すべてのドライブを制限する67108863
ドライブを制限しない0
.reg · CMD · PowerShell で適用する
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

; 選択項目 (1 つだけ使用)
; A および B ドライブのみを制限する
"NoViewOnDrive"=dword:00000003
; C ドライブのみを制限する
"NoViewOnDrive"=dword:00000004
; D ドライブのみを制限する
"NoViewOnDrive"=dword:00000008
; A、B および C ドライブのみを制限する
"NoViewOnDrive"=dword:00000007
; A、B、C および D ドライブのみを制限する
"NoViewOnDrive"=dword:0000000f
; すべてのドライブを制限する
"NoViewOnDrive"=dword:03ffffff
; ドライブを制限しない
"NoViewOnDrive"=dword:00000000
CMD
:: 選択項目 (1 つだけ使用)

:: A および B ドライブのみを制限する
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoViewOnDrive" /t REG_DWORD /d 3 /f
:: C ドライブのみを制限する
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoViewOnDrive" /t REG_DWORD /d 4 /f
:: D ドライブのみを制限する
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoViewOnDrive" /t REG_DWORD /d 8 /f
:: A、B および C ドライブのみを制限する
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoViewOnDrive" /t REG_DWORD /d 7 /f
:: A、B、C および D ドライブのみを制限する
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoViewOnDrive" /t REG_DWORD /d 15 /f
:: すべてのドライブを制限する
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoViewOnDrive" /t REG_DWORD /d 67108863 /f
:: ドライブを制限しない
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoViewOnDrive" /t REG_DWORD /d 0 /f
PowerShell
# 共通: キーを作成
New-Item -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Force | Out-Null

# 選択項目 (1 つだけ使用)
# A および B ドライブのみを制限する
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoViewOnDrive' -PropertyType DWord -Value 3 -Force | Out-Null
# C ドライブのみを制限する
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoViewOnDrive' -PropertyType DWord -Value 4 -Force | Out-Null
# D ドライブのみを制限する
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoViewOnDrive' -PropertyType DWord -Value 8 -Force | Out-Null
# A、B および C ドライブのみを制限する
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoViewOnDrive' -PropertyType DWord -Value 7 -Force | Out-Null
# A、B、C および D ドライブのみを制限する
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoViewOnDrive' -PropertyType DWord -Value 15 -Force | Out-Null
# すべてのドライブを制限する
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoViewOnDrive' -PropertyType DWord -Value 67108863 -Force | Out-Null
# ドライブを制限しない
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name 'NoViewOnDrive' -PropertyType DWord -Value 0 -Force | Out-Null