Pages

Monday, February 23, 2009

Regsvr32 unregister + register from Windows Explorer

This article by John Howard explains how to add commands to Windows Explorer to unregister and register DLLs and OCX's. This way takes less time than typing all the names at the command line.

Save the text below as Shortcuts.reg or some other name and merge to add registry entries & the right click menus to Windows Explorer. The %1 should be in double quotes in case the path to the DLL contains spaces.

REGEDIT4
[HKEY_CLASSES_ROOT\.dll]
@="dllfile"
[HKEY_CLASSES_ROOT\dllfile\shell]
@="WIN_SYS"
[HKEY_CLASSES_ROOT\dllfile\shell\REG_32]
@="Register"
[HKEY_CLASSES_ROOT\dllfile\shell\REG_32\command]
@="regsvr32.exe "%1""
[HKEY_CLASSES_ROOT\dllfile\shell\Unregister]
@=""
[HKEY_CLASSES_ROOT\dllfile\shell\Unregister\command]
@="regsvr32.exe /u "%1""
[HKEY_CLASSES_ROOT\.ocx]
@="dllfile"

No comments: