Silent installation of ASP.NET Core Hosting Bundle 3.1.1 fails
See original GitHub issueDescribe the bug
I have written a powershell script that launches silent installation of ASP.NET Core Hosting Bundle 3.1.1., but it runs very unstable on some PCs. In 2 installation cases - the script execution had failed. In 3 cases - it worked just fine.
To Reproduce
- Download bundle of the mentioned version (https://dotnet.microsoft.com/download/dotnet-core/3.1)
- Save following script to somewhere and edit the file location:
$setupfilelocation = 'LOCAION_HERE' #edit
$args = New-Object -TypeName System.Collections.Generic.List[System.String]
$args.Add("/quiet")
$args.Add("/install")
$args.Add("/norestart")
$Output = Start-Process -FilePath $setupfilelocation -ArgumentList $args -NoNewWindow -Wait -PassThru
If($Output.Exitcode -Eq 0)
{
net stop was /y
net start w3svc
}
else {
Write-HError "`t`t Something went wrong with the installation. Errorlevel: ${Output.ExitCode}"
Exit 1
}
- launch the script.
NOTE: I was not able to reproduce the issue afterwards on the same PC. So the first try - is the last try. That’s the reason why I am lacking any additional details. Also, I was not able to fully uninstall the bundle after installation so, I really hope that the the log which I managed to save will have a value.
Installation log
Burn v3.11.1.2318, Windows v10.0 (Build 16299: Service Pack 0), path: C:\WINDOWS\Temp\{5492E057-34E1-427C-9FC4-D51C9308B506}\.cr\13.1.19350.1.exe
Initializing string variable 'BundleNameShort' to value 'Microsoft .NET Core 3.1.1'
Initializing string variable 'BundleNameSub' to value 'Windows Server Hosting'
Initializing numeric variable 'OPT_NO_ANCM' to value '0'
Initializing numeric variable 'OPT_NO_FTS' to value '0'
Initializing numeric variable 'OPT_NO_LTS' to value '0'
Initializing numeric variable 'OPT_NO_SHAREDFX' to value '0'
Initializing numeric variable 'OPT_NO_RUNTIME' to value '0'
Initializing numeric variable 'OPT_NO_X86' to value '0'
Initializing numeric variable 'OPT_NO_SHARED_CONFIG_CHECK' to value '0'
Initializing string variable 'InstallResetIISState' to value 'disable'
Initializing string variable 'InstallNoIISState' to value 'disable'
Initializing string variable 'ModifyResetIISState' to value 'disable'
Initializing string variable 'ModifyNoIISState' to value 'disable'
Command Line: '-burn.clean.room=C:\Users\myuser\Documents\Work\AspNetCoreInstallationScript\13.1.19350.1.exe -burn.filehandle.attached=604 -burn.filehandle.self=600 /quiet /norestart'
Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\myuser\Documents\Work\AspNetCoreInstallationScript\13.1.19350.1.exe'
Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\myuser\Documents\Work\AspNetCoreInstallationScript\'
Setting string variable 'WixBundleLog' to value 'C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501.log'
Setting string variable 'WixBundleName' to value 'Microsoft .NET Core 3.1.1 - Windows Server Hosting'
Setting string variable 'WixBundleManufacturer' to value 'Microsoft Corporation'
Setting numeric variable 'WixStdBALanguageId' to value 1033
Setting version variable 'WixBundleFileVersion' to value '3.1.1.19615'
Detect begin, 6 packages
Setting string variable 'IISCoreWebEngineInstalled_x86' to value '1'
Setting string variable 'IISW3SVCInstalled_x86' to value '1'
Setting string variable 'IISCoreWebEngineInstalled_x64' to value '1'
Setting string variable 'IISW3SVCInstalled_x64' to value '1'
Condition 'NOT (((IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1)) OR ((IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1)))' evaluates to false.
Condition '((IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1)) OR ((IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1))' evaluates to true.
Setting string variable 'InstallResetIISState' to value '1'
Condition 'NOT (((IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1)) OR ((IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1)))' evaluates to false.
Condition '((IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1)) OR ((IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1))' evaluates to true.
Setting string variable 'ModifyResetIISState' to value '1'
Detected related package: {73DF6F8C-BCF4-4169-B724-83CAF2FF0FE4}, scope: PerMachine, version: 13.1.19320.0, language: 0 operation: MajorUpgrade
Condition 'DotNetRedistLtsProductVersion_x64 = v24.68.28408' evaluates to false.
Condition 'DotNetRedistLtsProductVersion_x86 = v24.68.28408' evaluates to false.
Detected package: AspNetCoreModuleV2_x86, state: Absent, cached: None
Detected package: AspNetCoreModuleV2_x64, state: Absent, cached: None
Detected package: DotNetRedistLts_x64, state: Absent, cached: None
Detected package: DotNetRedistLts_x86, state: Absent, cached: None
Detected package: AspNetCoreSharedFramework_x86, state: Absent, cached: None
Detected package: AspNetCoreSharedFramework_x64, state: Absent, cached: None
Detect complete, result: 0x0
Plan begin, 6 packages, action: Install
Condition 'NOT VersionNT64 AND (VersionNT >= v6.1) AND (IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1) AND (NOT OPT_NO_ANCM)' evaluates to false.
Condition 'VersionNT64 AND (VersionNT64 >= v6.1) AND (IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1) AND (NOT OPT_NO_ANCM)' evaluates to true.
Setting string variable 'WixBundleRollbackLog_AspNetCoreModuleV2_x64' to value 'C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_000_AspNetCoreModuleV2_x64_rollback.log'
Setting string variable 'WixBundleLog_AspNetCoreModuleV2_x64' to value 'C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_000_AspNetCoreModuleV2_x64.log'
Condition 'VersionNT64 AND (NOT OPT_NO_RUNTIME)' evaluates to true.
Skipping dependency registration on package with no dependency providers: DotNetRedistLts_x64
Setting string variable 'WixBundleLog_DotNetRedistLts_x64' to value 'C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_001_DotNetRedistLts_x64.log'
Condition '(NOT OPT_NO_RUNTIME) AND (NOT OPT_NO_X86)' evaluates to true.
Skipping dependency registration on package with no dependency providers: DotNetRedistLts_x86
Setting string variable 'WixBundleLog_DotNetRedistLts_x86' to value 'C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_002_DotNetRedistLts_x86.log'
Condition '(NOT OPT_NO_SHAREDFX) AND (NOT OPT_NO_X86)' evaluates to true.
Setting string variable 'WixBundleRollbackLog_AspNetCoreSharedFramework_x86' to value 'C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_003_AspNetCoreSharedFramework_x86_rollback.log'
Setting string variable 'WixBundleLog_AspNetCoreSharedFramework_x86' to value 'C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_003_AspNetCoreSharedFramework_x86.log'
Condition 'VersionNT64 AND (NOT OPT_NO_SHAREDFX)' evaluates to true.
Setting string variable 'WixBundleRollbackLog_AspNetCoreSharedFramework_x64' to value 'C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_004_AspNetCoreSharedFramework_x64_rollback.log'
Setting string variable 'WixBundleLog_AspNetCoreSharedFramework_x64' to value 'C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_004_AspNetCoreSharedFramework_x64.log'
Planned package: AspNetCoreModuleV2_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
Planned package: AspNetCoreModuleV2_x64, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
Planned package: DotNetRedistLts_x64, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: None, cache: Yes, uncache: No, dependency: None
Planned package: DotNetRedistLts_x86, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: None, cache: Yes, uncache: No, dependency: None
Planned package: AspNetCoreSharedFramework_x86, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
Planned package: AspNetCoreSharedFramework_x64, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
Plan complete, result: 0x0
Apply begin
Launching elevated engine process.
Launched elevated engine process.
Connected to elevated engine.
Pausing automatic updates.
Paused automatic updates.
Creating a system restore point.
Created a system restore point.
Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{b9acb827-c262-446e-abe2-497badb8ad4a}, options: 0x7, disable resume: No
Caching bundle from: 'C:\WINDOWS\Temp\{3093AD80-7C3A-410F-8594-03564C0FFEA6}\.be\WindowsServerHostingBundle.exe' to: 'C:\ProgramData\Package Cache\{b9acb827-c262-446e-abe2-497badb8ad4a}\WindowsServerHostingBundle.exe'
Registering bundle dependency provider: 62155173-e27b-3936-997f-56da96ed19b5, version: 3.1.1.19615
Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{b9acb827-c262-446e-abe2-497badb8ad4a}, resume: Active, restart initiated: No, disable resume: No
Verified acquired payload: AspNetCoreModuleV2_x64 at path: C:\ProgramData\Package Cache\.unverified\AspNetCoreModuleV2_x64, moving to: C:\ProgramData\Package Cache\{C2109FCE-737E-479E-98EC-039A39840AB9}v13.1.19350.0\aspnetcoremodule_x64_en_v2.msi.
Applying execute package: AspNetCoreModuleV2_x64, action: Install, path: C:\ProgramData\Package Cache\{C2109FCE-737E-479E-98EC-039A39840AB9}v13.1.19350.0\aspnetcoremodule_x64_en_v2.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" OPT_NO_SHARED_CONFIG_CHECK="0"'
Verified acquired payload: DotNetRedistLts_x64 at path: C:\ProgramData\Package Cache\.unverified\DotNetRedistLts_x64, moving to: C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe.
Verified acquired payload: DotNetRedistLts_x86 at path: C:\ProgramData\Package Cache\.unverified\DotNetRedistLts_x86, moving to: C:\ProgramData\Package Cache\4790D3117F4D4F7AF63113BBECD3BF0E8C940C2A\dotnet-runtime-3.1.1-win-x86.exe.
Verified acquired payload: AspNetCoreSharedFramework_x86 at path: C:\ProgramData\Package Cache\.unverified\AspNetCoreSharedFramework_x86, moving to: C:\ProgramData\Package Cache\{C88FD000-3A67-3FD6-B623-A588CC264D1D}v3.1.1.0\AspNetCoreSharedFramework-x86.msi.
Verified acquired payload: AspNetCoreSharedFramework_x64 at path: C:\ProgramData\Package Cache\.unverified\AspNetCoreSharedFramework_x64, moving to: C:\ProgramData\Package Cache\{14C06F09-47BF-37BA-AEF9-CC97A18E6DDC}v3.1.1.0\AspNetCoreSharedFramework-x64.msi.
Applied execute package: AspNetCoreModuleV2_x64, result: 0x0, restart: None
Registering dependency: {b9acb827-c262-446e-abe2-497badb8ad4a} on package provider: IIS_AspNetCore_Module_V2,x64, package: AspNetCoreModuleV2_x64
Applying execute package: DotNetRedistLts_x64, action: Install, path: C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe, arguments: '"C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe" /quiet /norestart'
Error 0x80070652: Process returned error: 0x652
Error 0x80070652: Failed to execute EXE package.
Error 0x80070652: Failed to configure per-machine EXE package.
Application requested retry of package: DotNetRedistLts_x64, encountered error: 0x80070652. Retrying...
Applying execute package: DotNetRedistLts_x64, action: Install, path: C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe, arguments: '"C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe" /quiet /norestart'
Error 0x80070652: Process returned error: 0x652
Error 0x80070652: Failed to execute EXE package.
Error 0x80070652: Failed to configure per-machine EXE package.
Application requested retry of package: DotNetRedistLts_x64, encountered error: 0x80070652. Retrying...
Applying execute package: DotNetRedistLts_x64, action: Install, path: C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe, arguments: '"C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe" /quiet /norestart'
Error 0x80070652: Process returned error: 0x652
Error 0x80070652: Failed to execute EXE package.
Error 0x80070652: Failed to configure per-machine EXE package.
Application requested retry of package: DotNetRedistLts_x64, encountered error: 0x80070652. Retrying...
Applying execute package: DotNetRedistLts_x64, action: Install, path: C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe, arguments: '"C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe" /quiet /norestart'
Error 0x80070652: Process returned error: 0x652
Error 0x80070652: Failed to execute EXE package.
Error 0x80070652: Failed to configure per-machine EXE package.
Applied execute package: DotNetRedistLts_x64, result: 0x80070652, restart: None
Error 0x80070652: Failed to execute EXE package.
Removing cached package: DotNetRedistLts_x64, from path: C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\
Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{b9acb827-c262-446e-abe2-497badb8ad4a}, resume: ARP, restart: None, disable resume: No
Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{b9acb827-c262-446e-abe2-497badb8ad4a}, resume: ARP, restart initiated: No, disable resume: No
Apply complete, result: 0x80070652, restart: None, ba requested restart: No
Shutting down, exit code: 0x652
Variable: BundleNameShort = Microsoft .NET Core 3.1.1
Variable: BundleNameSub = Windows Server Hosting
Variable: IISCoreWebEngineInstalled_x64 = 1
Variable: IISCoreWebEngineInstalled_x86 = 1
Variable: IISW3SVCInstalled_x64 = 1
Variable: IISW3SVCInstalled_x86 = 1
Variable: InstallNoIISState = disable
Variable: InstallResetIISState = 1
Variable: ModifyNoIISState = disable
Variable: ModifyResetIISState = 1
Variable: OPT_NO_ANCM = 0
Variable: OPT_NO_FTS = 0
Variable: OPT_NO_LTS = 0
Variable: OPT_NO_RUNTIME = 0
Variable: OPT_NO_SHARED_CONFIG_CHECK = 0
Variable: OPT_NO_SHAREDFX = 0
Variable: OPT_NO_X86 = 0
Variable: VersionNT = 10.0.0.0
Variable: VersionNT64 = 10.0.0.0
Variable: WixBundleAction = 5
Variable: WixBundleElevated = 1
Variable: WixBundleFileVersion = 3.1.1.19615
Variable: WixBundleInstalled = 0
Variable: WixBundleLog = C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501.log
Variable: WixBundleLog_AspNetCoreModuleV2_x64 = C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_000_AspNetCoreModuleV2_x64.log
Variable: WixBundleLog_AspNetCoreSharedFramework_x64 = C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_004_AspNetCoreSharedFramework_x64.log
Variable: WixBundleLog_AspNetCoreSharedFramework_x86 = C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_003_AspNetCoreSharedFramework_x86.log
Variable: WixBundleLog_DotNetRedistLts_x64 = C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_001_DotNetRedistLts_x64.log
Variable: WixBundleLog_DotNetRedistLts_x86 = C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_002_DotNetRedistLts_x86.log
Variable: WixBundleManufacturer = Microsoft Corporation
Variable: WixBundleName = Microsoft .NET Core 3.1.1 - Windows Server Hosting
Variable: WixBundleOriginalSource = C:\Users\myuser\Documents\Work\AspNetCoreInstallationScript\13.1.19350.1.exe
Variable: WixBundleOriginalSourceFolder = C:\Users\myuser\Documents\Work\AspNetCoreInstallationScript\
Variable: WixBundleProviderKey = 62155173-e27b-3936-997f-56da96ed19b5
Variable: WixBundleRollbackLog_AspNetCoreModuleV2_x64 = C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_000_AspNetCoreModuleV2_x64_rollback.log
Variable: WixBundleRollbackLog_AspNetCoreSharedFramework_x64 = C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_004_AspNetCoreSharedFramework_x64_rollback.log
Variable: WixBundleRollbackLog_AspNetCoreSharedFramework_x86 = C:\Users\A9D85~1.PAV\AppData\Local\Temp\dd_dd_DotNetCoreWinSvrHosting__20200121092501_003_AspNetCoreSharedFramework_x86_rollback.log
Variable: WixBundleSourceProcessFolder = C:\Users\myuser\Documents\Work\AspNetCoreInstallationScript\
Variable: WixBundleSourceProcessPath = C:\Users\myuser\Documents\Work\AspNetCoreInstallationScript\13.1.19350.1.exe
Variable: WixBundleTag =
Variable: WixBundleUILevel = 2
Variable: WixBundleVersion = 3.1.1.19615
Variable: WixStdBALanguageId = 1033
Exit code: 0x652, restarting: No
(timestamps removed)
Further technical details
- ASP.NET Core version 3.1.1
- Windows v10.0 (Build 16299: Service Pack 0)
Further thoughts
From the log I see that something named DotNetRedistLts_x64 failed to be installed.
[6124:0758][2020-01-21T09:25:06]i301: Applying execute package: DotNetRedistLts_x64, action: Install, path: C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe, arguments: '"C:\ProgramData\Package Cache\B9E2166EDDEFAA4D7543F24A2E7CD76C35D4E617\dotnet-runtime-3.1.1-win-x64.exe" /quiet /norestart'
[6124:0758][2020-01-21T09:25:46]e000: Error 0x80070652: Process returned error: 0x652
[6124:0758][2020-01-21T09:25:46]e000: Error 0x80070652: Failed to execute EXE package.
[41A4:5320][2020-01-21T09:25:46]e000: Error 0x80070652: Failed to configure per-machine EXE package.
[41A4:5320][2020-01-21T09:25:46]w348: Application requested retry of package: DotNetRedistLts_x64, encountered error: 0x80070652. Retrying...
Unfortunately I don’t see in the log any mentioning of what exactly failed and how to fix it. I would like to edit my powershell script accordingly, and due to hard error reproduction I have to ask for your advice.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:20 (10 by maintainers)
@pavlexander thanks for catching the automation issue! Let us know if @joeloff 's suggestions reveal anything new.
@pavlexander The bundles can be interrupted by something like another update running. Only a single MSI is permitted to execute at any given time. However, when an MSI is executing, you will usually see two MSIEXEC processes running. The OS usually tries to keep MSIEXEC active so it won’t need to do a cold start. This isn’t 100% reliable.
Another option would be to check the global MSI mutex, you can look at https://stackoverflow.com/questions/10144268/check-for-windows-installer-mutex-availability