Not exactly a code sample. Adds right click functionality for OCX/DLL files (register/unregister).
Put the following into a .reg file and double click it. You will now be able to r-click a dll or ocx and select register or unregister.
REGEDIT4 [HKEY_CLASSES_ROOT\dllfile\Shell\Register\Command] @="RegSvr32 \"%1\"" [HKEY_CLASSES_ROOT\dllfile\Shell\Unregister\Command] @="RegSvr32 /u \"%1\"" [HKEY_CLASSES_ROOT\.ocx] @="ocxfile" [HKEY_CLASSES_ROOT\ocxfile] @="OCX" [HKEY_CLASSES_ROOT\ocxfile\Shell\Register\Command] @="RegSvr32 \"%1\"" [HKEY_CLASSES_ROOT\ocxfile\Shell\Unregister\Command] @="RegSvr32 /u \"%1\""
