2

I built my project as 64bit (not ANY CPU) but specifically 64bit. All the dll's are 64bit; most of the them are managed code (C#), and a few files are unmanaged (C++ code).

I am creating a Installer in Installshield and I need to register dll's. I have read so much online that I am confused.

  • regsvr32 -> To register my C++ dll's, which regsvr32.exe should I use? System32 or Syswow64.
  • regasm -> To register my C# dll, which regasm I should use? framework/framework64
Michael Urman
  • 15,737
  • 2
  • 28
  • 44
Pawan Kumar
  • 247
  • 6
  • 21
  • Syswow64 regsvr32 should work. You may have to run as administrator. I usually use VS Developer command prompt. [here](http://stackoverflow.com/questions/1163503/what-is-difference-b-w-regasm-exe-and-regsvr32-how-to-generate-a-tlb-file-usi) is a link on differences between regsvr32 and regasm – Nyra Oct 02 '14 at 20:05
  • But i saw in one of the link that Syswow64 is for registering 32bit dll's. Naming convention is messed up. – Pawan Kumar Oct 02 '14 at 20:50

1 Answers1

4

On a 64-bit system, as viewed by a 64-bit application:

  • System32: contains 64-bit system files
  • SysWow64: contains 32-bit system files

On a 64-bit system, as viewed by a 32-bit application:

  • System32: typically redirected to SysWow64, so accesses 32-bit system files
  • SysNative: redirected to the real System32; accesses 64-bit files

On a 64-bit system, with filesystem redirection disabled (see IntallScript's WOW64FSREDIRECTION or Windows's Wow64DisableWow64FsRedirection) if you happen to have a path to the System32 folder, it will access the 64-bit files.

Regasm is not in this location; instead the 32-bit build is in Windows\Microsoft.NET\Framework\<version> and the 64-bit build is in Windows\Microsoft.NET\Framework64\<version>. No weird folder names here, but it's not the system folder.

Note: Registering a file requires the correct bitness and correct application. Furthermore if you are creating a Windows Installer Package (e.g. a Basic MSI project) you should not be calling tools like this at installation time; you should instead use build-time tools like COM Extraction for native DLLs and COM Interop for managed assemblies to turn their self-registration into MSI data: mark the component's 64-bit setting correctly and InstallShield is supposed handle the rest.

Michael Urman
  • 15,737
  • 2
  • 28
  • 44