0

I'm using WiX to install a 64 bit application. I've figured out how to make a 64 bit installer, but I'm having trouble figuring out how to register my DLLs I install so I don't get

"Program can't start because XXXX.dll is missing from your computer.  
 Try reinstalling the program to fix this problem"

errors.

I've tried using heat.exe to create the necessary RegistryValue tags, but it's not compatible with 64 bit DLLs. I compiled some of the DLLs in 32 bit (not all are available to me in 32 bit), but I still couldn't get heat.exe to work. Looking at this WiX help article it seems like I should be able to compose the RegistryValue tags manually, but I'm confused about what they should contain. I've been looking at the example here and it is much more complicated than the one in the WiX article.

What RegistryValue tags do I need to register a DLL with the OS so it can be found on the PATH?

EDIT: Additional context.

I'm trying to install an SDK and some sample source code. I'm putting the SDK (DLLs, .libs, and headers) in a folder in \Program Files, and I'm putting the sample source code in a folder on the desktop. I have the lib directories on %LIBPATH%,the include directories on %INCLUDE%, and the bin (DLL) directories on %PATH%.

Then I have a folder on the Desktop with a VS Solution for the sample code. In the solution I specify %LIBPATH% in the Additional Library Directories and %INCLUDE% in the Additional Include Directories fields of the VS Projects. That works fine and the solution will build. But when I try to run it I get the "DLL is missing from your computer" error. I'd like to figure out how to have the SDK DLLs be findable (whether that's on the %PATH% or not) so that the user can simply build and run the demo code without needing to copy the DLLs, and so that the same will be true of any other applications they build.

EDIT 2: I'm voting to close the question. It seems like registering a DLL using WiX is not relevant to my actual problem.

Community
  • 1
  • 1
stranger
  • 390
  • 4
  • 17
  • You may simply add `SelfRegCost="1"` to the [`File`](http://wixtoolset.org/documentation/manual/v3/xsd/wix/file.html) element of each DLL. – zett42 Mar 07 '17 at 23:58
  • I tried that and the registration failed. Also, it seems like that [isn't best practice](http://stackoverflow.com/questions/364187/how-do-you-register-a-win32-com-dll-file-in-wix-3). – stranger Mar 08 '17 at 00:25

1 Answers1

1

You're confusing two things here. "Registration" is a COM activity, but "XXXX.dll is missing" indicates an ordinary non-COM DLL.

Your reference to %PATH% also hints at a non-COM DLL, but %PATH% shouldn't be necessary. Instead, install your DLL alongside your executable.

In theory, there's also the Application Manifest, but Microsoft has made an utter mess of that. If you're writing any kind of ordinary application, I'd avoid them entirely.

MSalters
  • 173,980
  • 10
  • 155
  • 350
  • Thank you for your explanation. I edited the question to provide some context on why I can't put the DLLs in the EXE folder as you suggest. – stranger Mar 08 '17 at 15:14