0

My first question is about the error below :

Module [Path/Name of dll].dll failed to register. HRESULT -2147024769. Contact your support personnel.

I can continue the installation but i want to get rid of this error if possible.

The second question is about the following error :

Error 1001. Exception occured when initializing the installation. System.IO.FileNotFoundException: could not load file or assembly 'file:///C:\Windows\SysWOW64\files' or one of it's dependencies. The system cannot find the file specified.

I saw in different site and thread that the cause was the custom Action (in the value : /target=”[TARGETDIR]” -> /target=”[TARGETDIR]\”) but I can't found where is the error in my custom action. Here are the custom action realized using Designer for Wix Toolset :

<CustomAction Id="DIRCA_TARGETDIR" Property="TARGETDIR" Value="[ProgramFilesFolder][Manufacturer]\[ProductName]" Execute="firstSequence" />
<CustomAction Id="_FB3FF635_EF79_4863_91BD_70A0A11955B2.Uninstall" Execute="deferred" BinaryKey="InstallUtil" DllEntry="ManagedInstall" adx:VSName="Primary Output from Project" />
<CustomAction Id="_FB3FF635_EF79_4863_91BD_70A0A11955B2.Uninstall.SetProperty" Property="_FB3FF635_EF79_4863_91BD_70A0A11955B2.Uninstall" Value="/installtype=notransaction /action=uninstall /LogFile= /targ=&quot;[TARGETDIR]\&quot; /usr=[ALLUSERS] /usr2=[MSIINSTALLPERUSER] /CommonProjAppData=&quot;[PROJCOMMONDATA]\&quot; &quot;[#_F521D169_ECD0_42B5_87F7_C2D8B6F9CA54]&quot; &quot;[VSDFxConfigFile]&quot;" adx:VSName="Primary Output from Project" />
<CustomAction Id="_BE73DAD9_3524_4376_B45C_148B5871465B.Install" Execute="deferred" BinaryKey="InstallUtil" DllEntry="ManagedInstall" adx:VSName="Primary Output from Project" />
<CustomAction Id="_BE73DAD9_3524_4376_B45C_148B5871465B.Install.SetProperty" Property="_BE73DAD9_3524_4376_B45C_148B5871465B.Install" Value="/installtype=notransaction /action=install /LogFile= /targ=&quot;[TARGETDIR]\&quot; /usr=[ALLUSERS] /usr2=[MSIINSTALLPERUSER] /CommonProjAppData=&quot;[PROJCOMMONDATA]\&quot; &quot;[#_F521D169_ECD0_42B5_87F7_C2D8B6F9CA54]&quot; &quot;[VSDFxConfigFile]&quot;" adx:VSName="Primary Output from Project" />
<CustomAction Id="CA_CreateConfig" BinaryKey="ADXDPCADLL" DllEntry="GetConfig" />

Thanks for helping.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
Erebos
  • 93
  • 2
  • 10

1 Answers1

1

You're basically going in the wrong direction. You've converted a Visual Studio setup to WiX but you're trying to carry that VS custom action framework into WiX. The VS framework that calls managed code custom actions involves calling a C++ binary that then tries to load a NET runtime then use reflection to get into your assembly, instantiate classes and call methods. Apart from the fact that the InstallUtil Dll is transparent, undocumented and architecture dependent (you need either the 64-bit version or the 32-bit version) and therefore impossible to debug in cases like this, nobody actually bothers to propagate all this stuff into the WiX world because there are much better alternatives. For example if you're using installer classes to install services you don't need them at all. See ServiceInstall and ServiceControl. For generic custom action calls into managed code use the DTF managed code custom action framework.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • As you supposed I'm using installer class but the problem is that I'm using my installer class to set env variable and I didn't see a way to set those with ServiceInstall and ServiceControl. If I'm not mistaken, your answer is only about the custom action, in that case do you have an idea about the register error ? – Erebos May 20 '15 at 08:09
  • I would suggest reading the below link. The fix to your problems is going to require a comprehensive review of what the custom action is doing and refactoring to Windows Installer best practices. http://robmensching.com/blog/posts/2007/4/19/managed-code-customactions-no-support-on-the-way-and-heres/ – Christopher Painter May 21 '15 at 12:52
  • You can set environment variables using the WiX Environment element. Windows Installer has many capabilities that VS setups don't support, but WiX does. – PhilDW May 21 '15 at 16:18