Create registry file (.reg) equivalent to the RegSvr32 command

If you have already programmed a bit in OLE/ActiveX/Shell extensions/etc. in the Microsoft world, you already know the RegSvr32 command used to register/unregister these dll components. The regsvr32.exe command only calls the DllRegisterServer entry point, i.e. a method with that name located in the DLL. Typically, but not limited to, this method creates keys (nodes and leaves) in order to register the component inside the Windows registry.

Now, let’s say you have an ActiveX component and you want to see the keys it would create when self-registering, but for some reason you don’t want to actually install it on your computer. Visual Studio has a tool that is extremely convenient for this. It is called Registry Capture (regcap.exe). You can launch it on your dll component in order to generate a reg file containing the registry keys:

regcap /O output_file.reg activex.dll


About nidget

Technology enthousiast, Java and JEE expert, IT architect.
This entry was posted in Tips and tricks and tagged , , , , , , , , , . Bookmark the permalink.

3 Responses to Create registry file (.reg) equivalent to the RegSvr32 command

  1. Ненад says:

    Just what I needed!

  2. Thumbs up to Article! says:

    There seems to be a way to thumbs-up a comment. What about the article itself!?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s