Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: VB
Expertise: Beginner
Jan 21, 2004



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Register ActiveX Files Using the Mouse

Do you find yourself constantly registering and unregistering ActiveX .exe, .dll, .ocx, or .olb files? This script allows you to do so with just a mouse click. Here's how to use it:
  1. Open Notepad.
  2. Paste the following code into Notepad:
    @="%1 /register"
    @="regsvr32.exe %1"
    @="regsvr32.exe %1"
    @="regsvr32.exe %1"
    [HKEY_CLASSES_ROOT\dllfile\shell\Silent Register\command]
    @="regsvr32.exe /s %1"
    [HKEY_CLASSES_ROOT\ocxfile\shell\Silent Register\command]
    @="regsvr32.exe /s %1"
    [HKEY_CLASSES_ROOT\olbfile\shell\Silent Register\command]
    @="regsvr32.exe /s %1"
    @="%1 /unregister"
    @="regsvr32.exe /u %1"
    @="regsvr32.exe /u %1"
    @="regsvr32.exe /u %1"
    [HKEY_CLASSES_ROOT\dllfile\shell\Silent UnRegister\command]
    @="regsvr32.exe /u /s %1"
    [HKEY_CLASSES_ROOT\ocxfile\shell\Silent UnRegister\command]
    @="regsvr32.exe /u /s %1"
    [HKEY_CLASSES_ROOT\olbfile\shell\Silent UnRegister\command]
    @="regsvr32.exe /u /s %1"
  3. Save the file as register.reg.
  4. Right click on register.reg and select Merge from the context menu. Alternatively, you can run regedit and import the file.
After merging the script, you should be able to right click on any .exe, .dll, .ocx, or .olb file and see a list of register and unregister options.

Note: Make sure that regsvr32.exe is in your path or the menu commands will fail.

Matthew Hanna
Thanks for your registration, follow us on our social networks to keep up-to-date