DelphiFAQ Home Search:

Register (install) a DLL on Windows from the command line?

 

comments4 comments. Current rating: 5 stars (3 votes). Leave comments and/ or rate it.

Question:

How can I register (install) a DLL on Windows from the command line?

Answer:

It is possible that your application requires this DLL to be on the search path. In this case you could move it to \Windows\System32
Or the application requires it to be in the application directory.

Now to register it, you need to move to the directory where the DLL is located and use the commandline tool RegSvr32. This tool should be on your search path (in \Windows\System32).

At the command prompt do the following:

// to register it:
regsvr32.exe  MyLibrary.dll


// if you don't like the dialog box popping up afterwards:
// option /s means 'silent'
regsvr32.exe /s MyLibrary.dll


// if you want to unregister (uninstall) it later:
regsvr32.exe /u MyLibrary.dll

// silent version
regsvr32.exe /u /s MyLibrary.dll

Comments:

2005-12-22, 10:54:07
mlvarnado@yahoo.com from United States  
rating
Thank you!
2007-12-19, 01:48:06
anonymous from Belgium  
Is it also possible to register dlls if you are not administrator on your PC?

I am building my own dll and it has to be registered by IT support every time. But I found that if I just overwrite the dll with new versions, it often works, but not always. After a while (when too many changes are in the dll I guess), it stops working and I have to go through IT again.

Is there a way around this?

The dll is for use in excel
2007-12-24, 12:14:04
anonymous from United States  
rating
this is gunna help!
2008-02-17, 23:25:11
anonymous  
rating

 

 

Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option.
 
It seems that you are
from Washington, US .

Info/ Feedback on this

Show city and country
Show country only
Hide my location
Leave your comment here:
Please type in the code:
photo Add a picture:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.