none
Getting localized bootstrapper to check for .NET framework installed on localized Windows

    Question

  • I have the following issue. I use the MSBuild task GenerateBootstrapper to generate a setup.exe file for my MSI installation package. This works great for english based OS'es (WinXP, Vista and Win7), but when running localized version of Windows 7 this bootstrapper isn't able to figure out that .NET is already installed. On norwegian version of WinXP it works just as intended, but not in Win7 - haven't tested Vista, but my guess is that Vista would works the same way as Win7.

    I tried to create a norwegian package.xml file under the Bootstrapper\Packages\DotNetFX35\no directory and specify the culture in the GenereateBootstrapper to use Norwegian (tried both no-NO and nb-NO), but with no success. The bootstrapper still thinks that .NET framework isn't installed.

    These are the changes made in the package.xml (changing the registry key to check for norwegian installed .NET):

    <InstallChecks>
        <RegistryCheck Property="DotNet35InstallSuccess" Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1044" Value="Install" />
    </InstallChecks>
    ...
    <String Name="Culture">no-NO</String>

    Here is the MSBuild setup:

    <ItemGroup>
      <BootstrapperFile Include="Microsoft.Net.Framework.3.5">
        <ProductName>.NET Framework 3.5</ProductName>
      </BootstrapperFile>
      <BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
        <ProductName>Windows Installer 3.1</ProductName>
      </BootstrapperFile>
    </ItemGroup>
    ....
    <GenerateBootstrapper ApplicationFile="$(TargetFileName)" ApplicationName="Yoobits" ApplicationUrl="http://$(InstallerHost)$(DownloadUrl)" BootstrapperItems="@(BootstrapperFile)" CopyComponents="True" ComponentsLocation="Relative" OutputPath="$(OutputPath)" Path="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\" Culture="no-NO" FallbackCulture="en-US" />

    I've tried to install the norwegian language pack for .NET framework, but without success. Actually I've had problems locating 64bit version of Norwegian language pack for .NET.

    Any pointers on how to address this issue would be appreciated.

    ------ Trond

    • Edited by Trond Andersen Friday, April 09, 2010 6:59 AM Added a bit more detail information
    • Moved by YiChun Chen Saturday, April 10, 2010 5:32 AM MSBuild issue (From:.NET Framework Setup)
    Thursday, April 08, 2010 1:33 PM

All replies

  • Hi Trond,

    I am moving this thread from Base ".Net Framework Setup" forum to the "MSBuild" forum, since the issue is related to MSBuild. There are more experts in the "MSBuild" forum.

    Thanks!

    Best regards,
    Yichun Chen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Saturday, April 10, 2010 5:32 AM
  • I am moving this thread from Base ".Net Framework Setup" forum to the "MSBuild" forum, since the issue is related to MSBuild. There are more experts in the "MSBuild" forum.

    I don't think this is actually a MSBuild issue since the MSBuild task is a thin wrapper over the Windows SDK (and the setup.bin). I actually think the issue is related to the Windows SDK which generates the bootstrapper file.

    ------- Trond

    Monday, April 12, 2010 7:06 AM
  • Hi Trond,

    Thanks for your post.

    I noticed there is a subkey 1044 under HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\ in your side, it means the language package is Norwegian (Bokml) - Norway (nb-NO), but not (no-NO). For CultureInfo names list, please check MSND article: CultrueInfo Class.

    So I suspect this issue maybe caused by Culture attribute in GenerateBootstrapper Task. You can try to change it to nb-NO . About why this issue happen on Windows 7, but it works fine in Windows XP, I guess it's possibly because  .NET framework 3.5 which is installed with Windows 7 is the same language with Operating System, but you need to install .NET framework 3.5 separately on Windows XP, so the resource of .Netframework on Windows XP maybe is en-US. In this case, your MSI installation will work fine on XP, for it can find English version of .NET framework, but fail on Windows 7 for both of versions are missing.

    And I would suggest you don't use HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1044 in RegistryCheck Element, HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5 is enough. Please see Sample code to detect .NET Framework install state and service pack level for details.

    If I misunderstood you, or you have any comments, please feel free to let me know.

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

     

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, April 12, 2010 10:18 AM
  • Hi Trond,

    I am writing to follow up this issue. Please let me know what I can help. Thanks.

     

     

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, April 14, 2010 7:14 AM
  • I noticed there is a subkey 1044 under HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\ in your side, it means the language package is Norwegian (Bokml) - Norway (nb-NO), but not (no-NO). For CultureInfo names list, please check MSND article: CultrueInfo Class.

    So I suspect this issue maybe caused by Culture attribute in GenerateBootstrapper Task. You can try to change it to nb-NO .

    As mentioned in the first post I've tried both nb-NO and no-NO. 
    About why this issue happen on Windows 7, but it works fine in Windows XP, I guess it's possibly because  .NET framework 3.5 which is installed with Windows 7 is the same language with Operating System, but you need to install .NET framework 3.5 separately on Windows XP, so the resource of .Netframework on Windows XP maybe is en-US. In this case, your MSI installation will work fine on XP, for it can find English version of .NET framework, but fail on Windows 7 for both of versions are missing.

     

    And I would suggest you don't use HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1044 in RegistryCheck Element, HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5 is enough. Please see Sample code to detect .NET Framework install state and service pack level for details.

    Agreed that the difference between WinXP and Win7 probably is the reason for this issue. Regarding the second point. I have installed the Windows SDK and as part of that SDK there is a directory Boostrapping\Packages\DotNetFX35. This directory contains a directory called "en". Under this "en" directory there is a package.xml file. This package.xml file - if I have understood this correctly - is used by the bootstrapper. If you look into this file you will find the following written:

     

    <InstallChecks>
        <RegistryCheck Property="DotNet35InstallSuccess" Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1033" Value="Install" />
    </InstallChecks>
    ...
    <InstallConditions>
        <BypassIf Property="DotNet35InstallSuccess" Compare="ValueEqualTo" Value="1"/>
        ....
    </InstallConditions>
    ....
    

    What I've done is to create a similar setup for the norwegian language in order to support norwegian Windows 7 with .NET framework installed. I've tried to create a folder named "nb", "nb-NO", "no", "no-NO" and include a eula and a package.xml as described in the first post without getting the bootstrapper to recognize norwegian installed .NET version.

    I guess that I could modify the original package.xml (under en directory) to use a different registry key (dropping the language code) and just check for the existence of the key instead of the install value. I haven't tried this. If it works, it might be doable, but what bothers me with this solution is that I have to change every developers machine in order to get a build that works properly.

    If I misunderstood you, or you have any comments, please feel free to let me know.

    I hope I explained my issue better.

     

    ------- Trond

    • Edited by Trond Andersen Wednesday, April 14, 2010 8:49 AM Minor formatting
    Wednesday, April 14, 2010 8:34 AM
  •  Please see Sample code to detect .NET Framework install state and service pack level for details.

    I have problems seeing how I can use this information with the MSBuild task to generate a bootstrapper. I might be missing some information here, but a sample .NET project which utilizes this might help. ----- Trond Andersen
    Wednesday, April 14, 2010 8:54 AM
  • I've tried to modify the registry check in the package.xml file under the en directory. Now the install check looks like this:

    <InstallChecks>
        <RegistryCheck Property="DotNet35InstallSuccess" 
                Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5" 
                Value="Install" />
    </InstallChecks>
    By looking at the registry I see that the Install registry value exist both under the language code (1033 or 1044) and directly under 3.5. This had no effect on the bootstrapper generated. It still insists on installing .NET framework on a norwegian computer with 3.5 already installed.

    Update: I got this working now. I was convinced from a time back that the bootstrapper used the 32bit version of the packages and made changes to C:\Program Files (x86)\Microsoft SDK\... instead of the 64bit version. When I changed the 64 bit version, it started working.

    Still - this isn't a optimal solution because I have to change every developer PC.

    Wednesday, April 14, 2010 2:30 PM
  • Hi Trond,

    We recommend that you do not design applications that require a specific .NET Framework language pack, to test whether .NET Framework 3.5 is installed by checking the following registry key is enough:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5

    I think it will work fine although you only installed Norwegian version .NET Framework language Pack. Please check the article for more information:

    .NET Framework 3.5 Deployment Guide for Application Developers

    About why it got working by replace 64bit version to 32bit version SDK, I'm very confused, I think it will work fine to deploy 32 bit application to 64bit Operating System, it does not need to replace SDK. And I would suggest you post the question about deployment project on our ClickOnce and Setup & Deployment Projects forum. There are lots of deployment experts in "ClickOnce and Setup & Deployment Projects" forum.

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, April 15, 2010 10:35 AM