views:

314

answers:

2

Our installer generates a bootstrapper (setup.exe) and a MSI file - a pretty common scenario.

One of the production machines reports a strange problem during install:

  • If the user launches the bootstrapper (setup.exe), it reports that .NET 3.5 is not installed. This happens with account under administator group. No matter if they launch it as administrator or not, same behavior.

  • the application installs fine when application.msi or OurInstallLauncher.exe (see below for explanation) is started directly no matter if run as administrator is applied.

  • We have checked that .NET is installed on the machine (both 64bit and 32bit "versions" = under both C:\Windows\Microsoft.NET\Framework64 and C:\Windows\Microsoft.NET\Framework there is a folder named v3.5.

This happens on a 64 bit Windows 7. I can not reproduce it on my development 64 bit Windows 7. On Windows XP and Vista, it has worked without any problem for a long time so far.

Part of our build script that declares the GenerateBootStrapper task (nothing special):

<ItemGroup>
  <BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
    <ProductName>Microsoft Windows Installer 3.1</ProductName>
  </BootstrapperFile>
  <BootstrapperFile Include="Microsoft.Net.Framework.3.5">
    <ProductName>Microsoft .NET Framework 3.5</ProductName>
  </BootstrapperFile>
</ItemGroup>

  <GenerateBootstrapper
    ApplicationFile=".\Files\OurInstallLauncher.exe"        
    ApplicationName="App name"
    Culture="en"
    ComponentsLocation ="HomeSite"
    CopyComponents="True"
    Validate="True"
    BootstrapperItems="@(BootstrapperFile)"
    OutputPath="$(OutSubDir)"
    Path="$(SdkBootstrapperPath)" />

Note: OurInstallLauncher.exe is language selector that applies a transform to the msi based on user selection. This is not relevant to the question at all because the installer never gets as far as launching this exe!

EDIT: It displays that .NET 3.5 is missing right after starting setup.exe and proposes to install .NET 3.5. When the user agrees with the install, the .NET 3.5 installer says that .NET 3.5 is already installed and the MSI installer proceeds. If they choose to not install .NET 3.5, the installation ends.

Has anyone seen this behavior before?

A: 

The fact that the MSI installs without problems is not surprising, considering that it is only the bootstrapper which concerns itself with installing .NET 3.5. MSI packages don't need .NET in order to be installed (unless you use custom actions implemented in .NET assemblies, or register .NET assemblies in the GAC).

Uninstall and reinstall .NET on the machine that has the issue. It is most likely just a .NET install that has been corrupted somehow.

Wim Coenen
Please note that not only the MSI installs, but the installed .NET 3.5 application also works :) The problem is that the bootstrapper is not detecting .NET 3.5 being installed. Thanks for the reinstall tip, but our client claims this machine is newly installed and they believe this is a generic problem in the installer and would like to prevent this from happening on other machines
Marek
@Marek: reinstalling .NET is still the best way to eliminate the possibility of a corruption of the .NET install. We install .NET the same way, and we've also had a few clients report issues like this. It always turned out to be a problem with the machine, not our installer.
Wim Coenen
@Wim it seems that reinstalling .NET re-creates the 1033 entry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5. This issue is fixable by removing \1033 from the Bootstrapper definition for .NET 3.5 on build machine - then the bootstrapper detects .NET correctly.Thanks for help on this question and on the related one as well!
Marek
+1  A: 

This seems to be a bug either in Bootstrapper or in Windows 7.

Solution:

C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFX35\en\package.xml has to be tweaked on the build machine, because default German Windows 7 installations do not have this key present:

  <RegistryCheck Property="DotNet35InstallSuccess" 
Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1033" Value="Install" />

As a result, the installer reported that .NET 3.5 is not installed on the target machine (German Windows 7).

In order for the setup to detect installed .NET correctly, the C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFX35\en\package.xml file must be tweaked as following:

\1033 must be removed from the registry check key:

  <RegistryCheck Property="DotNet35InstallSuccess" 
Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5" Value="Install" />
Marek

related questions