0

I'm trying to solve the same error that occurred three years ago and doesn't have an answer. After installing IIS via GUI or powershell Install-WindowsFeature -name Web-Server -IncludeManagementTools I get the error: (The first two lines in English say error adding or removing characteristics. The operation couldn't finish because a restart is required)

Install-WindowsFeature : Error en la solicitud para agregar o quitar características en el servidor especificado.

La operación no se puede finalizar porque es necesario reiniciar el servidor especificado.
En línea: 1 Carácter: 1
+ Install-WindowsFeature -name Web-Server -IncludeManagementTools
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : DeviceError: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature], Exce
   ption
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_Reboot_Required,Microsoft.Windows.ServerManager.Commands.AddWindow
   sFeatureCommand

IIS is installed until I reboot and then it rolls back and uninstalls.

Blindly trying things like DISM /Online /Cleanup-Image /RestoreHealth had no effect.

Here is c:\windows\iisx.log : Here is the relevant section in the massive c:\windows\logs\cbs

Google found lots of the same non-error but no solution worked for me.

Running the PS script(before the installation) Get-PendingReboot found here to determine if a reboot is required:

Computer           : WIN-CIE9BIN05A3
CBServicing        : False
WindowsUpdate      : False
CCMClientSDK       : 
PendComputerRename : False
PendFileRename     : False
PendFileRenVal     : 
RebootPending      : False

The relevant section of the Cbs log I think is near the end:

2018-01-05 03:22:10, Info                  CSI    00000384 Creating NT transaction (seq 8), objectname '(null)'
2018-01-05 03:22:10, Info                  CSI    00000385 Created NT transaction (seq 8) result 0x00000000, handle @0xf30
2018-01-05 03:22:10, Info                  CSI    00000386 Error STATUS_CANNOT_DELETE while executing operation DeleteFile on [l:46]'\??\C:\Windows\System32\inetsrv\apphostsvc.dll'

2018-01-05 03:22:10, Info                  CBS    Setting ExecuteState key to: ExecuteStateNone
2018-01-05 03:22:10, Info                  CBS    Setting RollbackFailed flag to 0
2018-01-05 03:22:10, Info                  CBS    Clearing HangDetect value
2018-01-05 03:22:10, Info                  CBS    Saved last global progress. Current: 0, Limit: 1, ExecuteState: ExecuteStateNone
2018-01-05 03:22:10, Info                  CBS    Exec: Scheduled TrustedInstaller for auto-start because rollback was pended. [HRESULT = 0x00000000 - S_OK]
2018-01-05 03:22:10, Info                  CBS    TI: CBS has signaled that a reboot is required.
2018-01-05 03:22:10, Error                 CBS    Exec: An error occurred while committing the transaction and the transaction rollback requires a reboot. [HRESULT = 0x80070bc9 - ERROR_FAIL_REBOOT_REQUIRED]
2018-01-05 03:22:10, Info                  CBS    Perf: InstallUninstallChain complete.
2018-01-05 03:22:10, Info                  CSI    00000387@2018/1/5:10:22:10.502 CSI Transaction @0x2003a2be850 destroyed
2018-01-05 03:22:10, Info                  CBS    Failed to execute execution chain. [HRESULT = 0x80070bc9 - ERROR_FAIL_REBOOT_REQUIRED]
2018-01-05 03:22:10, Error                 CBS    Failed to process single phase execution. [HRESULT = 0x80070bc9 - ERROR_FAIL_REBOOT_REQUIRED]
2018-01-05 03:22:10, Info                  CBS    WER: Generating failure report for package: Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.14393.0, status: 0x80070bc9, failure source: Execute, start state: Installed, target state: Installed, client id: DISM Package Manager Provider
2018-01-05 03:22:10, Info                  CBS    Not able to query DisableWerReporting flag.  Assuming not set... [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]
2018-01-05 03:22:10, Info                  CBS    Added C:\Windows\Logs\CBS\CBS.log to WER report.
2018-01-05 03:22:10, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20180104154517.log to WER report.
2018-01-05 03:22:10, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20180104142952.log to WER report.
2018-01-05 03:22:10, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20180103145329.log to WER report.
2018-01-05 03:22:10, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20171231105556.log to WER report.
2018-01-05 03:22:10, Info                  CBS    Not able to add %windir%\winsxs\pending.xml.bad to WER report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]
2018-01-05 03:22:11, Info                  CBS    FinalCommitPackagesState: Started persisting state of packages
2018-01-05 03:22:11, Info                  CBS    TI: CBS has queried the current reboot required state: 1

A few lines up in the log is another possible idea: I have IIS express installed from VS and it looks like the Express folders may be interfering with the installation.

2018-01-05 03:22:08, Info                  CBS    FLOW: Enter Installation Stage: Primitive Installer Analysis, Current Operation Stage: Installing
2018-01-05 03:22:08, Info                  CSI    00000368@2018/1/5:10:22:08.813 CSIPERF - FileMapsCreated 325ms
2018-01-05 03:22:08, Info                  CSI    00000369 Unable to delete directory [l:28 ml:29]'\??\C:\inetpub\custerr\en-US'; it is still owned by component Microsoft-Windows-IIS-HttpErrorsBinaries.Resources, version 10.0.14393.0, arch amd64, culture [l:5]'en-US', nonSxS, pkt {l:8 b:31bf3856ad364e35}

2018-01-05 03:22:08, Info                  CSI    0000036a Unable to delete directory \??\C:\inetpub\history; file CFGHISTORY_0000000001 exists

2018-01-05 03:22:08, Info                  CSI    0000036b Unable to delete directory \??\C:\inetpub\temp\appPools; file APCD57C.tmp exists

2018-01-05 03:22:08, Info                  CSI    0000036c Unable to delete directory \??\C:\inetpub; file custerr exists

2018-01-05 03:22:08, Info                  CSI    0000036d Unable to delete directory [l:29 ml:30]'\??\C:\Windows\Inf\W3SVC\0C0A'; it is still owned by component Microsoft-Windows-IIS-W3SVC.Resources, version 10.0.14393.0, arch amd64, culture [l:5]'es-ES', nonSxS, pkt {l:8 b:31bf3856ad364e35}

2018-01-05 03:22:08, Info                  CSI    0000036e Unable to delete directory \??\C:\Windows\Inf\W3SVC; file 0C0A exists

2018-01-05 03:22:08, Info                  CSI    0000036f Unable to delete directory [l:37 ml:38]'\??\C:\Windows\System32\inetsrv\en-US'; it is still owned by component Microsoft-Windows-IIS-ASPBinaries.Resources, version 10.0.14393.0, arch amd64, culture [l:5]'en-US', nonSxS, pkt {l:8 b:31bf3856ad364e35}

2018-01-05 03:22:08, Info                  CSI    00000370 Unable to delete directory [l:37 ml:38]'\??\C:\Windows\System32\inetsrv\es-ES'; it is still owned by component Microsoft-Windows-IIS-ASPBinaries.Resources, version 10.0.14393.0, arch amd64, culture [l:5]'es-ES', nonSxS, pkt {l:8 b:31bf3856ad364e35}

2018-01-05 03:22:08, Info                  CSI    00000371 Unable to delete directory [l:37 ml:38]'\??\C:\Windows\SysWOW64\inetsrv\en-US'; it is still owned by component Microsoft-Windows-IIS-ASPBinaries.Resources, version 10.0.14393.0, arch Host= amd64 Guest= x86, culture [l:5]'en-US', nonSxS, pkt {l:8 b:31bf3856ad364e35}

2018-01-05 03:22:08, Info                  CSI    00000372 Unable to delete directory [l:37 ml:38]'\??\C:\Windows\SysWOW64\inetsrv\es-ES'; it is still owned by component Microsoft-Windows-IIS-ASPBinaries.Resources, version 10.0.14393.0, arch Host= amd64 Guest= x86, culture [l:5]'es-ES', nonSxS, pkt {l:8 b:31bf3856ad364e35}

Result: nope uninstalling IIS express didn't fix the installation.

  • Maybe try to install IIS with minimal functionality and add what you need after a successful installation. Not sure how to do this in PS, but you can do this from Add server roles – Mr Zach Jan 5 '18 at 12:23
  • @MrZach I tried that already. The reboot pending isn't what's causing the error I think. That is saying the rollback can't be completed without a reboot. – user5389726598465 Jan 5 '18 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.