locked
how to register a COM in Program files folder RRS feed

  • Question

  • A COM file to be registed is under of Program Files (x86).  I tried to register it by using following command (Run cmd.exe as administrator):

    regsvr32 c:\Program Files (x86)\myFolder\myDll.dll

    It failed with the message of:

    The module "c:\program" failed to load

    I can register it successfully by using following commands:

    cd c:\program files (x86)\myFolder and regsvr32 myDll.dll

    but it is not I expected. I expected is in full path.

    It seems that regsvr32.exe is not happy with a path contain a space, is it?

    Would you please help me to sort it out. Thank you.

    Tuesday, October 25, 2011 1:07 PM

Answers

  • Try
    regsvr32 "c:\Program Files (x86)\myFolder\myDll.dll"

     

    • Marked as answer by CWXie Tuesday, October 25, 2011 3:03 PM
    Tuesday, October 25, 2011 2:41 PM

All replies

  • Try
    regsvr32 "c:\Program Files (x86)\myFolder\myDll.dll"

     

    • Marked as answer by CWXie Tuesday, October 25, 2011 3:03 PM
    Tuesday, October 25, 2011 2:41 PM
  • Thank you.

    It works.

    Tuesday, October 25, 2011 3:04 PM
  • That's not a good choice of location.  COM Dlls are often shared, and that Program Files folder is usually only the default install folder and it can be changed. If another setup uses that Dll and installs it to a custom location, and then one of the setups is uninstalled it will all break. The CommonFiles folder \Company\Product is where shared Dlls usually go.
    Phil Wilson
    Tuesday, November 1, 2011 9:41 PM