Last active
May 14, 2026 03:22
-
-
Save SimonSeider/b8fd01daed6dba109946201a40a2c306 to your computer and use it in GitHub Desktop.
block-vlc.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $base = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" | |
| # we enable the DisallowRun policy for the current user | |
| New-Item -Path $base -Force | Out-Null | |
| New-ItemProperty -Path $base -Name "DisallowRun" -PropertyType DWord -Value 1 -Force | Out-Null | |
| # we create the application block list container | |
| $block = Join-Path $base "DisallowRun" | |
| New-Item -Path $block -Force | Out-Null | |
| # we block VLC executable explicitly | |
| New-ItemProperty -Path $block -Name "1" -PropertyType String -Value "vlc.exe" -Force | Out-Null | |
| # we refresh Explorer so policy applies immediately | |
| Stop-Process -Name explorer -Force | |
| Start-Process explorer.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment