DelphiFAQ Home Search:

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

 

comments24 comments. Current rating: 4 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

Content-type: text/html

Comments:

You are on page 1 of 2, other pages: [1] 2
2005-12-22, 10:54:07
mlvarnado@yahoo.com from United States  
rating
Thank you!
2008-07-22, 08:29:16
kovacsio@hotmail.com  
I try to install the 'ODAR4.DLL' support for Microsoft embedded Visual C++ ,win ce 4.2 ,
as follows
start=> run
regsvr32 'C:\Program Files\Microsoft eMbedded C++ 4.0\Common\EVC\Bin\ODAR4.DLL'

but I get an error message
Failed - invalid access to memory location.

can anybody help me with a solution???


Ori.
2009-03-07, 23:44:20
anonymous from Qatar  
to: kovacsio@hotmail.com - lols. its wrong. you need to copy first the dll in put it in the system 32 before you try to register it. Aa what the delfhinfaq said '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). ' the sentence is so clear 'This tool should be on your search path (in \Windows\System32). '
2009-05-05, 03:34:38
anonymous from Germany  
anonymous: 'the sentence is so clear 'This tool should be on your search path (in \Windows\System32). ''
i'm sorry to say that, but - you are wrong. The Tool regsvr32 is supposed to be in windows\system32\, that's why they say 'This tool should...' the dll can stay whereever it is.
makes no sense to copy the dll to system32 and registering it from here, because if you copy the dll back to its location, windows won't find it, because you only registered a dll in 'system32'
kovacsio must have a different problem.
2010-01-03, 01:13:29
carioca from Australia  
I've searched far and wide for a solution to just such a problem: my SwPrv.dll exists in the system32 directory, but apps that require it to function (e.g. Backup in Windows Home Server), can't trigger/use it...

How the hell do I get it to function?
2010-02-23, 16:57:34
anonymous from United States  
i think your problem might be b/c dos doesn't reconize spaces so the file location is invalid
2010-04-19, 14:37:11
draekane@gmail.com from United States  
i think your problem might be b/c dos doesn't reconize spaces so the file location is invalid

This is correct, so, when registering on a Windows Machine, through a command line, just make sure you have the whole filepath in Quotes and it solves this problem. Outside of the Windows world, couldn't offer any suggestions.
2012-02-12, 18:34:08   (updated: 2012-02-12, 18:35:51)
anonymous from United States  
I tried registering Google Chrome in Command Prompt:
'C:\Documents and Settings\Aidan\Local Settings\Application Data\Google\Chrome\Application\chrome.exe' /REGSERVER

This is supposed to add Chrome to the directory of apps so later I can type 'chrome http://www.google.com' and it would open the website in a Chrome window. How come it doesn't work when I try to access Chrome from a different folder? See screenshot for details.
2012-04-29, 18:23:05
anonymous from United States  
i think your problem might be b/c dos doesn't reconize spaces so the file location is invalid

Surround the filename with quotation marks if it contains spaces. (Hopefully it doesn't if it's an application.)
2012-09-07, 15:52:57
manclor  
i tried this with a corrupted .dll :)
2012-09-14, 03:44:01
anonymous from Korea (R)  
[spammer 61.105.174.6]
2012-11-12, 02:24:18
anonymous from United Kingdom  
2013-02-26, 21:57:35
anonymous  
2013-04-03, 04:31:25
anonymous from India  
koool..
2013-06-18, 01:04:43
anonymous from United States  
Board diagnostics (OBD)<a href=' http://www.obd2cent..'>ds708 scanner</a> system has come a very long way to go, because in the early<a href=' http://www.obd2cent..>ADS-1S Scanner</a> 1980s. OBD easy access to health status information<a href=' http://www.obd2cent..s'>obd2 center</a> to the owners of vehicles. This also makes the work of the mechanic is very easy to find, if any. In earlier versions, only a specific part of the failure can be reported through appropriate indicator. But the latest version of OBD2 connector and has the ability to identify the problem. <a href=' http://www.obd2cent..da'>Vas Pc</a>This makes the the mechanic job easier and low maintenance costs of employers - CR5
You are on page 1 of 2, other pages: [1] 2

 

 

NEW: Optional: Register   Login
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, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

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.

photo Add a picture: