Monday, July 2, 2012

How to Manually Register or re-register a .DLL file via Command Line

Problem;
You have the need to manually register or re-register a .DLL file from a command prompt window

Solution;
Manually register or re-register a .DLL file using the regsvr32 command
  1. Click Start and type cmd in the Start Search box
  2. right-click cmd (command prompt), and then click Run as Administrator
  3. When prompted by the UAC click Continue
  4. When the command prompt window opens use the 'cd' command to browse to the directory (folder) in which the .DLL file resides
  5. type regsvr32 nameofthefile.dll Note; you can receive a "dllRegisterServer" error when trying to register .dll files if you didn't run command prompt at an elevated error (like mentioned in step 2)
 Syntax of regsvr32;
  • /c Get the console output
  • /s If you don't want any dialogs use this switch for silent option
  • /u Used to unregister .dll files
  • /n Register .dll files without dllRegisterServer
  • /i Register .dll files with DllInstall
Example;
regsvr32 /s shell32.dll

No comments:

Post a Comment