Problem of running on system without Microsoft Visual C++ 2010 x86 Redistributable

Oct 23, 2012 at 3:03 PM

When I ran the installer on a fresh Windows 8 x64 - there were no applications or any programs installed on the machine (Programs and Features has an empty list),  I got System error: "The program can't start because MSVCR100.dll is missing from your computer. Try reinstalling the program to fix this problem."

 

Did a little Google search and found that "Microsoft Visual C++ 2010 x86 Redistributable" is needed. Is the problem caused by the fact that the installer was built with VS 2010?

How to solve this problem? 

Coordinator
Oct 23, 2012 at 3:22 PM

I thought I had built the code with statically linked runtime but this error indicates I haven't - I'll do some investigation and see what I can find. Do you know if the same thing happens with the standard BA?

Oct 23, 2012 at 6:02 PM

No, I don't see the error with standard BA.

I  was trying to build the extension BA with VS 2008, but could not compile due to the use of  VS 2010's TBPFLAG,  ITaskbarList3, etc.

Coordinator
Oct 23, 2012 at 10:32 PM

I am not seeing this, I am running on a clean Win8 x64 VM - if I use process explorer to view the running bundle there don't seem to be any references to VC runtime components. Are you using the version I released or one you have built yourself?

Oct 23, 2012 at 11:14 PM
Edited Oct 24, 2012 at 12:39 AM

I am using the one built myself with VS 2010. Did you use VS 2010 to build your BA? If so, it should depend on MSVCR100.dll. If you attach a debugger to your installer, should should see MSVCR100.dll as one of your loaded modules.

Coordinator
Oct 24, 2012 at 5:57 AM

I actually used VS 2012 in VS 2010 compatibility mode. I don't see MSVCR100.dll loaded as I believe I have built the component with statically linked libraries - I will check further today. Can you try my version to see it that has the issue?

Coordinator
Oct 24, 2012 at 8:35 AM

I have checked wixextba.dll with "depends" and can't see it referencing MSVCR100.dll, I have also attached a debugger to an install created with wixextba.dll and again I don't see MSVCR100.dll (I do see msvcrt.dll but that is loaded by some of the system dlls). So I am a bit stumped why you are seeing this.

Oct 24, 2012 at 12:51 PM
Edited Oct 24, 2012 at 1:46 PM

It is caused by using dynamic link.  Static link solves the problem. Thanks! 

Coordinator
Oct 24, 2012 at 4:00 PM

Is that a problem in the source presented here or just your version?

Oct 24, 2012 at 5:14 PM

Just my version. 

Coordinator
Oct 24, 2012 at 5:15 PM

Thanks - if I can be of any more assistance please let me know.

Oct 24, 2012 at 8:59 PM

Thanks, I do have a problem on putting a condition on bundle installer:

      <bal:Condition Message="This product requires .NET Framework 3.5 SP1 or higher. Please install the required .NET Framework then run this installer again.">        <![CDATA[Installed OR (NETFRAMEWORK35_SP_LEVEL and NOT NETFRAMEWORK35_SP_LEVEL = "#0")]]>      </bal:Condition>

 

compiles, but doesn't work. The log says the consition is false.

Condition 'Installed OR (NETFRAMEWORK35_SP_LEVEL and NOT NETFRAMEWORK35_SP_LEVEL = "#0")' evaluates to false.

 

Any idea?

Coordinator
Oct 24, 2012 at 9:04 PM

Installed is not a Bundle variable, see http://wix.sourceforge.net/manual-wix3/bundle_built_in_variables.htm. I think you want WixBundleInstalled.

Oct 24, 2012 at 9:11 PM
Edited Oct 24, 2012 at 9:15 PM

Thanks for the quick response. I changed to use WixBundleInstalled, but got the same error.

 

log:


[11EC:1E38][2012-10-24T17:07:52]: Condition 'WixBundleInstalled OR (NETFRAMEWORK35_SP_LEVEL and NOT NETFRAMEWORK35_SP_LEVEL = "#0")' evaluates to false.

[11EC:1E38][2012-10-24T17:07:52]: Error 0x81f40001: Bundle condition evaluated to false: WixBundleInstalled OR (NETFRAMEWORK35_SP_LEVEL and NOT NETFRAMEWORK35_SP_LEVEL = "#0")

 

Note: I place the condition check right before <BootstrapperApplicationRef ...

      <bal:Condition Message="This product requires .NET Framework 3.5 SP1 or higher. Please install the required .NET Framework then run this installer again.">        <![CDATA[NETFRAMEWORK35_SP_LEVEL and NOT NETFRAMEWORK35_SP_LEVEL = "#0"]]>      </bal:Condition>            

      <BootstrapperApplicationRef Id="WixExtendedBootstrapperApplication.RtfLicense"> 

Coordinator
Oct 24, 2012 at 9:20 PM

How are you setting NETFRAMEWORK35_SP_LEVEL? This is what I have for a condition to check for .NET on Win8:

<util:RegistrySearchRef Id="Netfx35Version" />
<bal:Condition Message="My message">NOT ((VersionNT &gt;= v6.2) AND NOT (Netfx35Version AND (Netfx35Version &gt;= v3.5.30729.1)))</bal:Condition>

Oct 24, 2012 at 11:31 PM

I found NETFRAMEWORK35_SP_LEVEL and NETFRAMEWORK35 in http://wix.sourceforge.net/manual-wix3/wixnetfxextension.htm.

I thought they should be set by wix.

 

Got this error if I put search in my code:

error CNDL0104: Not a valid source file; detail: 'util' is an undeclared prefix

Coordinator
Oct 25, 2012 at 6:06 AM

I am fairly sure you can only use them in MSI authoring, did you add a reference to WixNetfxextension?

To use util you need to reference the WixUtilExtension and add xmlns:util="http://schemas.microsoft.com/wix/UtilExtension".

Oct 25, 2012 at 2:20 PM

I got

Unresolved reference to symbol 'WixSearch:Netfx35Version'

Coordinator
Oct 25, 2012 at 2:24 PM

Did you add the reference to WixUtilExtension to your VS project?

Oct 25, 2012 at 2:31 PM

Yes, 

wix_3.6.3303.0\light.exe -nologo -sw1055 -ext WixUtilExtension -ext C:\Delivery\BsiWixBalExtension.dll -ext WiXNetFxExtension .....

Coordinator
Oct 25, 2012 at 3:53 PM

I am not sure but I think you also need "-ext WixUtilExtension" on the candle command line. It looks like you aren't using WiX from the installed location, are you sure it is referencing the 3.6.3303 version of WixUtilExtension? to be sure you could use -ext "wix_3.6.3303.0\WixUtilExtension.dll".

Oct 25, 2012 at 4:24 PM

I use full path for both compiler and linker, same error:  error LGHT0094 : Unresolved reference to symbol 'WixSearch:Netfx35Version'

C:\pwss4ru\src\bsitools\wix_3.6.3303.0\candle.exe -nologo -ext C:\pwSS4ru\src\bsitools\wix_3.6.3303.0\WixUtilExtension.dll -ext C:\pwss4ru\out\Winx86\BuildContexts\dms\Delivery\BsiWixBalExtension.dll -ext WiXNetFxExtension

C:\pwss4ru\src\bsitools\wix_3.6.3303.0\light.exe -nologo -sw1055 -ext C:\pwSS4ru\src\bsitools\wix_3.6.3303.0\WixUtilExtension.dll -ext C:\pwss4ru\out\Winx86\BuildContexts\dms\Delivery\BsiWixBalExtension.dll -ext WiXNetFxExtension

Coordinator
Oct 25, 2012 at 5:05 PM

Doh my bad - I didn't post the actual code for the search, you need this not the util:RegistrySearchRef :

<util:RegistrySearch Id="Netfx35Version" Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v3.5" Value="Version" Variable="Netfx35Version" />

Oct 25, 2012 at 5:23 PM

Great! Thanks!

Oct 25, 2012 at 9:13 PM

Have you tried to build your BA with VS 2008?

Coordinator
Oct 25, 2012 at 9:21 PM

No I haven't but given that I believe the WiX code is built with 2010 I didn't think it was necessary.

Oct 26, 2012 at 6:42 PM

Is it possible to add the 'Modify" ability to change which program features are installed in each package in the bundle? The option will display the Custom Section dialog of the each package in the bundle and allow user to change the way features are installed. Like the picture below>

http://i.imgur.com/zyAel.jpg?1

Coordinator
Oct 27, 2012 at 8:16 AM

It isn't something I have looked at, I guess you could add a change button to the repair/uninstall page but you would then have to implement the behaviour in the code - it might be just a case of calling repair with the new properties. Try asking the question on the WiX users forum, someone else might have done it.

Jul 10, 2013 at 11:16 PM
I also have a problem with bal:Condition compiling but not working. Using WiX 3.7 with:
<Wix ... xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle ... Condition="WixBundleInstalled OR VersionNT > v7.0"/>
</Wix>

works great except for the known issue of not being able to define the error message.

If instead I use:

<Wix ... xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle ... >
<bal:Condition><![CDATA[WixBundleInstalled OR VersionNT > v7.0]]></bal:Condition>
</Bundle>
</Wix>

The bundle goes ahead and runs anyway.
Coordinator
Jul 11, 2013 at 6:13 AM
I am not sure you can use WixBundleInstalled in the bal condition, I would suggest asking the question on wix-users.