1
votes

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?

2
Related question that may help me solve this problem: stackoverflow.com/questions/2598134/…Marek

2 Answers

3
votes

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" />
0
votes

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.