32

I am adapting VLC to make a custom video player. I chose VLC because of its ability to play lots of formats, and because it allows me develop a custom skin for it very easily.

But I also want to restrict user access to the file system, for which I need to disable the right click menu. Is there a way to do this?

awreccan
  • 671
  • 1
  • 7
  • 11

5 Answers5

56
  1. Open the Registry Editor (regedit.exe). Find HKEY_CLASSES_ROOT\Directory\shell
  2. Under this key find each VLC key you would like to remove from folder context menus
  3. (Optional) right-click each key and choose Export. Save the exported reg files as PlayWithVLC-dir and AddToPlaylistVLC-dir. These .reg files can later be used to restore the context menu entries.
  4. Delete the key

Unfortunately VLC doesn't have an Preferences option to toggle this.

Solution found in the Remove context menu forum thread.

qubodup
  • 8,687
  • 5
  • 37
  • 45
TheAtomicOption
  • 1,456
  • 1
  • 12
  • 21
  • Thanks for the instructions. – fharper Dec 01 '16 at 21:58
  • 1
    Probably want to do this under HKEY_LOCAL_MACHINE\Software\Classes\Directory\shell, as HKEY_CLASSES_ROOT is a [merged view](https://learn.microsoft.com/en-us/windows/desktop/sysinfo/merged-view-of-hkey-classes-root) of HKEY_CURRENT_USER\Software\Classes and HKEY_LOCAL_MACHINE\Software\Classes, and therefore shouldn't be edited directly. – browly Aug 22 '18 at 22:22
  • You may be correct for the backup, but wouldn't this only matter if you're adding keys? (in which case i assume they'd be added to both locations.) For deleting keys it shouldn't matter what view you go through to find them so long as they're removed right? – TheAtomicOption Aug 22 '18 at 23:35
  • Is this even answering the question? Or what is the original question? I thought OP was asking about context menu while playing videos inside VLC? – Tom Charles Zhang Sep 29 '20 at 01:10
22

Instead of playing around in the registry:

  1. uninstall VLC. You will be asked, if you want to keep your user settings. Say yes if you want to.
  2. download VLC installer again http://www.videolan.org/vlc/
  3. during installation uncheck the "Context Menus" install option.

For some people it was possible to skip step 1. But that may not work always.

enter image description here

Welcor
  • 2,431
  • 21
  • 32
  • 13
    You don't even have to uninstall VLC first, you can just run the installer, and choose 'Add/Rmove/Reinstall components'. – BetaLyte Nov 07 '19 at 07:35
  • @BetaLyte that is even better! – Welcor Nov 07 '19 at 08:22
  • 3
    For some reason, this didn't work for me. It did not remove the context menu entries when right clicking on a directory in file explorer. I had to delete the registry keys manually for those. – joejoejoejoe4 Jan 09 '20 at 22:39
  • @jippyjoe4 hm, I modified this yesterday. yesterday the first step was to uninstall VLC before... maybe in some cases this is required. i will go back to the previous edit then. – Welcor Jan 10 '20 at 07:58
19

Use this PowerShell script using an elevated console (RunAs Admin)

New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT #not permanent
Remove-Item HKCR:\Directory\shell\AddToPlaylistVLC\ -Recurse
Remove-Item HKCR:\Directory\shell\PlayWithVLC\ -Recurse
PollusB
  • 1,726
  • 2
  • 22
  • 31
4

Or just use CCleaner:

  1. Open CCleaner,

  2. Chose Tools,

  3. Select Startup,

  4. Go to context menu column on the right,

  5. Find what program you want to disable or delete from context menu,

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
user9488863
  • 49
  • 1
  • 1
  • 4
    Just to bring up the point. CCleaner could still have malware in it. https://www.pcworld.com/article/3225407/security/ccleaner-downloads-infected-malware.html – Mahendran Jul 09 '18 at 11:32
2

Create or download the following .reg files with the respective content:

DELETE-AddToPlaylistVLC (download)

Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\shell\AddToPlaylistVLC]

DELETE-PlayWithVLC.reg (download)

Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\shell\PlayWithVLC]

Then double-click for the menu entry you want removed.

qubodup
  • 8,687
  • 5
  • 37
  • 45