Register and unregister COM component using regsvr32 command

You’ll need to open Command Prompt in Admin mode to make the changes especially when User Account Control (UAC) is enabled on your Windows 10 machine. CD to system32 for 64-bit registration and SysWoW64 for 32-bit registration.
Place the COM component in the folder from you want to register and also your executable is placed e.g. “C:\Code\bin\” in the example below.

To register use the below command:

regsvr32 "C:\Code\bin\MailObj.dll"

To unregister use the below command:

regsvr32 /u "C:\Code\bin\MailObj.dll"

You should get a prompt that the register/unregister command succeeded.
This command can be used to register/unregister DLL or OCX files.

Advertisement

Leave a Reply

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.