DelphiFAQ Home Search:

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

 

comments22 comments. Current rating: 5 stars (2 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:

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-06-18, 21:46:21
anonymous from Colombia  
One alleged victim would routinely throw away his underwear to hide [url= http://www.louisvui..net/]Louis Vuitton Bags[/url] the supposed abuse. Week two of the trial began with a final prosecution witness. The mother of Victim No. 9 took the [url= http://www.chanelou..et/]Chanel Purses[/url] stand Monday to detail her son’s cover-up of the alleged sordid acts he suffered at Sandusky’s hands. “I [url= http://www.guccibel..rg/]Hermes Belts[/url] always wondered why he never had any underwear in the laundry,” she testified. “He just told me he had an [url= http://www.beltsout...org/]Mens Belts[/url] accident and he threw them out.” Indeed, she testified that he started becoming “sick” more often after [url= http://www.topbelts..org/]Gucci Belts[/url] spending time with the ex-Penn State coach. Victim No. 9 supposedly slept over at the Sandusky residence more than 100 times.Victim No. 9 testified [url= http://www.louisvui..net/]Louis Vuitton Handbags[/url] last Thursday that he screamed during one episode of alleged abuse, hoping that [url= http://www.beltsonl..com/]Louis Vuitton Belts[/url] Sandusky’s wife, who he said was always upstairs, would hear. “I think the basement is soundproof,” he said [url= http://www.chanels-..om/]Chanel Handbags[/url] tearfully, noting that Sandusky’s wife Dottie never did come down.Lead defense attorney Joe Amendola has also [url= http://www.chanelba..om/]Chanel Handbag[/url] suggested previously that the accusers and the Attorney General’s office might be colluding. Lead prosecutor Joe [url= http://www.lvshopos..net/]Louis Vuitton Purses[/url] McGettigan has often queried the alleged victims while on the stand: “Have I ever, ever, ever told you what to say?” which they’ve answered with resounding denials. But it could be a larger issue for Kline and the other subpoenaed attorneys to defend themselves against a [url= http://www.louisvui..com/]Louis Vuitton Purse[/url]
charge of violating the gag order issued by Judge Cleland, which bars any representative from either side from discussing the case with the media.


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  
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: