none
Need help with capturing registry entries of 64 bit dlls(COM exe, dll, ocx, .NET dll) in 32 bit process

    Question

  • I have a custom applciaiton which generates an MSI,

    Requirement : To create a MSI which will register all the dlls and/or exes (32 bit, 64 bit) in the target system.

    Solution: MSI tables such as TypeLib, SelfReg are available for registering, however it is not recommended by Microsoft.

    Ref: http://msdn.microsoft.com/en-us/library/aa372092(v=vs.85).aspx

     “Installation package authors are strongly advised against using the TypeLib table. Instead, they should register type libraries by using the Registry table. Reasons for avoiding self registration include:

    If an installation using the TypeLib table fails and must be rolled back, the rollback may not restore the computer to the same state that existed prior to the rollback. Type libraries registered prior to rollback may not be registered after rollback.”

     

    Another option is to capture the registry entries of the dlls or exes and insert these records to Registry table of MSI.

    I am using RegSpy tool to capture registry entries of the COM dll, COM exe, ocx file and RegAsm.exe (with /regfile option) to capture the COM Visible .NET assembly registry entries.

     

    Problem description: However there is an issue with capturing 64 bit dll entries using any of these tools from a 32-bit OS. Currently our application will not be able to move to 64 bit solution.Is there an option to just capture the 64 bit dll/exe/ocx registry entries from a 32-bit process?

    Wednesday, April 06, 2011 5:31 AM

Answers

  • Hi Phil,

    Thank you for the reply. We do create two different MSI for the 32 and 64 bit architecture.

    I have another use case scenario, where I need to build only the 64 bit MSI. And I use a 32 bit OS to create a 64 bit MSI, in this case is it possible to extract the COM entries of a 64 bit dll or exe, using a 32-bit process? 


    Hi PSengunthar,

    If you want to compiler your application as a 64bit application, you can change the Palntform target as x64. By default, it is AnyCPU.

    By the com entries should be the matched plantform target on which the system that you want to run the application.  If you want to compiler your app as x64, the com entries should be a x64 pantform target.

    Best Regards


    Neddy Ren [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Neddy Ren Tuesday, May 03, 2011 1:25 AM
    Tuesday, April 26, 2011 3:16 AM

All replies

  • Most people just use the 32-bit version of the Win32 Dll to get the COM entries. It would be a little odd to have different Guids for different OS architectures. You need two separate MSIs anyway.

    http://blogs.msdn.com/b/heaths/archive/2008/01/15/different-packages-are-required-for-different-processor-architectures.aspx


    Phil Wilson
    • Proposed as answer by Neddy Ren Friday, April 08, 2011 9:11 AM
    • Marked as answer by Neddy Ren Monday, April 11, 2011 9:25 AM
    • Unmarked as answer by PSengunthar Friday, April 15, 2011 7:15 AM
    Wednesday, April 06, 2011 5:57 PM
  • Hi Phil,

    Thank you for the reply. We do create two different MSI for the 32 and 64 bit architecture.

    I have another use case scenario, where I need to build only the 64 bit MSI. And I use a 32 bit OS to create a 64 bit MSI, in this case is it possible to extract the COM entries of a 64 bit dll or exe, using a 32-bit process? 

    Tuesday, April 12, 2011 6:40 AM
  • Hi Phil,

    Thank you for the reply. We do create two different MSI for the 32 and 64 bit architecture.

    I have another use case scenario, where I need to build only the 64 bit MSI. And I use a 32 bit OS to create a 64 bit MSI, in this case is it possible to extract the COM entries of a 64 bit dll or exe, using a 32-bit process? 


    Hi PSengunthar,

    If you want to compiler your application as a 64bit application, you can change the Palntform target as x64. By default, it is AnyCPU.

    By the com entries should be the matched plantform target on which the system that you want to run the application.  If you want to compiler your app as x64, the com entries should be a x64 pantform target.

    Best Regards


    Neddy Ren [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Neddy Ren Tuesday, May 03, 2011 1:25 AM
    Tuesday, April 26, 2011 3:16 AM