none
Program Files (x86) folder

    Question

  • I have a 32-bit application which installs into C:\Program Files (x86) folder on 64-bit Windows.  The application includes a couple of DLL files that are used for shell extensions and system hooks.  So, even though the app is 32-bit, I have to include 64-bit versions of these DLLs so that they'll work on 64-bit Windows.

    I only want a single 32-bit installer.  So I'm planning to install two versions of these files (e.g., shellext32.dll and shellext.64.dll) and calling regsvr32.exe on the appropriate one at install time based on the bitness of the OS.

    Is it ok to install both versions of these files in C:\Program Files (x86), or is there a compelling reason why I should install shellext32.dll in C:\Program Files (x86) and shellext64.dll in C:\Program Files.

    Thursday, September 01, 2011 7:26 PM

All replies

  • nrcaliendo wrote:
    >
    >I have a 32-bit application which installs into C:\Program Files (x86)
    >folder on 64-bit Windows.  The application includes a couple of DLL
    > files that are used for shell extensions and system hooks.  So,
    >even though the app is 32-bit, I have to include 64-bit versions
    >of these DLLs so that they'll work on 64-bit Windows. I only want
    >a single 32-bit installer.  So I'm planning to install two versions
    >of these files (e.g., shellext32.dll and shellext.64.dll) and
    >calling regsvr32.exe on the appropriate one at install time
    >based on the bitness of the OS.
     
    Remember that you'll want to register BOTH DLLs on a 64-bit system.  There
    are two versions of regsvr32 (one in System32, one in SysWOW64), but each
    one knows how to call the other if it is fed the wrong type of binary.
     
    >Is it ok to install both versions of these files in
    >C:\Program Files (x86), or is there a compelling reason why I
    >should install shellext32.dll in C:\Program Files (x86) and
    >shellext64.dll in C:\Program Files.
     
    There is no compelling reason either way.  If we were talking about
    System32 vs SysWOW64 I would have an opinion, but when I install a driver
    package, I let everything go into "Program Files (x86)" (because the
    installer is 32-bit), and register the appropriate files from there.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, DDK MVP Providenza & Boekelheide, Inc.
    Friday, September 02, 2011 3:24 AM
  • Thanks for the reply. Is the reason I need to regsvr32 both DLLs on 64-bit Windows because it's possible to run the 32-bit shell from %systemroot%\SysWow64?
    Friday, September 02, 2011 11:27 AM
  • nrcaliendo wrote:
    >
    >Thanks for the reply. Is the reason I need to regsvr32 both DLLs on
    >64-bit Windows because it's possible to run the 32-bit shell from
    >%systemroot%\SysWow64?
     
    Well, you never said what KIND of server you were registering.  If you are
    registering a shell extension, then it's probably OK just to register the
    64-bit one.  Anyone who goes out of their way to run a 32-bit Explorer gets
    what they deserve.
     
    For a more general COM component, you want to be able to cover both 32-bit
    and 64-bit worlds.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, DDK MVP Providenza & Boekelheide, Inc.
    Saturday, September 03, 2011 8:58 PM
  • Ah!  I should have been clearer.  I'm not registering a COM server, just an ordinary shell extension that provides a quick link into my application from the desktop.  I assumed that running 32-bit Explorer on 64-bit Windows would be a very fringe case, so I was surprised when you recommended registering both DLLs.

    Thanks again.

    Sunday, September 04, 2011 5:51 PM