locked
Setup.exe Does Not Prompt For Admin Credentials When It Should RRS feed

  • Question

  • Hi,

    I have posted this question at the following partner forum (http://social.microsoft.com/Forums/en/partnerdevvs/thread/6059eba7-6ef6-4bf0-b7c6-6abb5db51b13) and was redirected here to possibly find some other ideas.  So I am reposting my questions/comments below.

    I am creating a bootstrap setup.exe file using a Bootstrapper.manifest file along with msbuild.  Here is what my Bootstrapper.manifest file looks like:

     

    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

      <PropertyGroup>

        <ApplicationUrl></ApplicationUrl>

        <ApplicationName></ApplicationName>

        <ApplicationFile></ApplicationFile>

        <OutputPath></OutputPath>

        <ComponentsUrl></ComponentsUrl>

    <WindowsSDKPath>$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\GenericBootstrapper\4.0@Path)</WindowsSDKPath>

      </PropertyGroup>

     <ItemGroup>

        <BootstrapperFile Include=".NETFramework,Version=v4.0">

          <ProductName>.NET Framework 4.0</ProductName>

        </BootstrapperFile>

        <BootstrapperFile Include="Microsoft.VSTORuntime.4.0">

          <ProductName>VSTO 4.0</ProductName>

        </BootstrapperFile>

        <BootstrapperFile Include="Microsoft.Windows.Installer.3.1">

          <ProductName>Windows Installer 3.1</ProductName>

        </BootstrapperFile>

      </ItemGroup>

     <Target Name="Bootstrapper">

        <GenerateBootstrapper

            ApplicationFile="$(ApplicationFile)"

            ApplicationName="$(ApplicationName)"

            ApplicationUrl="$(ApplicationUrl)"

            BootstrapperItems="@(BootstrapperFile)"

            Path="$(WindowsSDKPath)"

            ComponentsUrl="$(ComponentsUrl)"

            ComponentsLocation="Absolute"

            Culture="en"

            FallbackCulture="en-US"

            CopyComponents="True"

            Validate="True"

     OutputPath="$(OutputPath)"

        />

      </Target>

    </Project>

     

     

    As you can see, when the created setup.exe file is executed, .NET 4.0 and VSTO 4.0 will be installed.  I am running this setup.exe as a standard user that does not have any admin rights.  When I run this on Windows 7 and Windows Vista (both 32 bit and 64 bit and UAC turned on), I am prompted to enter admin credentials and everything installs successfully.  When I run this on Windows XP, I get the following error (note that .NET 4.0 is already installed prior to running this setup.exe):

     

    Prerequisite check for system component Microsoft Visual Studio 2010 Tools for Office Runtime (x86 and x64) failed with the following error message: "Administrator permissions are required to install the Microsoft Visual Studio 2010 Tools for Office Runtime (x86 and x64). Contact your administrator."

     

     

    The install log file looks like this:

     

     

    The following properties have been set:

    Property: [AdminUser] = false {boolean}

    Property: [InstallMode] = SpecificSite {string}

    Property: [ProcessorArchitecture] = Intel {string}

    Property: [VersionNT] = 5.1.3 {version}

    Running checks for package 'Microsoft .NET Framework 4 (x86 and x64)', phase BuildList

    Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'

    Read string value '4.0.30319'

    Setting value '4.0.30319 {string}' for property 'DotNet40Full_TargetVersion'

    The following properties have been set for package 'Microsoft .NET Framework 4 (x86 and x64)':

    Property: [DotNet40Full_TargetVersion] = 4.0.30319 {string}

    Running checks for command 'DotNetFX40\dotNetFx40_Full_x86_x64.exe'

    Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': false

    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet40Full_TargetVersion' and value '4.0.30129': true

    Result of checks for command 'DotNetFX40\dotNetFx40_Full_x86_x64.exe' is 'Bypass'

    Running checks for command 'DotNetFX40\dotNetFx40_Full_setup.exe'

    Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': true

    Result of checks for command 'DotNetFX40\dotNetFx40_Full_setup.exe' is 'Bypass'

    'Microsoft .NET Framework 4 (x86 and x64)' RunCheck result: No Install Needed

    Running checks for package 'Microsoft Visual Studio 2010 Tools for Office Runtime (x86 and x64)', phase BuildList

    Reading value 'Version' of registry key 'HKLM\SOFTWARE\Microsoft\VSTO Runtime Setup\v4R'

    Unable to read registry value

    Not setting value for property 'VSTORuntimeVersionInstalled'

    The following properties have been set for package 'Microsoft Visual Studio 2010 Tools for Office Runtime (x86 and x64)':

    Running checks for command 'VSTOR40\vstor40_x86.exe'

    Skipping ByPassIf because Property 'VSTORuntimeVersionInstalled' was not defined

    Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': false

    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': true

    Result of checks for command 'VSTOR40\vstor40_x86.exe' is 'Fail'

    'Microsoft Visual Studio 2010 Tools for Office Runtime (x86 and x64)' RunCheck result: Fail

    A prerequisite failed for Package "Microsoft Visual Studio 2010 Tools for Office Runtime (x86 and x64)"

    Package failed with message "Administrator permissions are required to install the Microsoft Visual Studio 2010 Tools for Office Runtime (x86 and x64). Contact your administrator."

    I cannot seem to get this to prompt me for admin credentials like it does on Windows 7 or Windows Vista.  I don't understand why it won't give a prompt on XP.  In my research for this issue, I encountered the following link:  http://msdn.microsoft.com/en-us/library/bb756929.aspx  I have tried using all execution levels and none of them seem to make any difference.  I still get the same behavior as above.  I have since learned from posting on a partner forum that these settings only work for UAC (Vista and Windows 7).

    I'm thinking there has to be a way to do this.  Let me explain my scenario more.  As I said before, I am trying to execute a bootstrap setup.exe process.  I am calling this install my Prerequisites Install.  Lets say I then create another bootstrap setup.exe which will execute my Prerequisites Install first (if necessary) and then execute an MSI which installs my application.  I am calling this my Full Install.

    When I run the Full Install on XP, its first step is to call my Prerequisites Install.  When I do this, I DO get prompted for admin credentials during the Prerequisites Install (when VSTO is about to be installed).  But when I run the Prerequisites Install by itself, I DO NOT get prompted for admin credentials.  I really do not understand what the difference is, but this makes it seem like it should be possible to get prompted for admin credentials in both cases.

     

    Thanks for any ideas you might have.

    ~Corey

    Thursday, April 14, 2011 1:51 PM