Hi,
From what I know the TS script is run with account SYSTEM and when I run manually is with created local admin account.
We could run the script through the psexec tool to simulate the system account.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello all! Wondering if you can help me since I'm not an expert in SCCM or TS's, I wrote a script that is called in a TS to manage the language packages in Windows 11.
I have a call to Dism in the script as:
$outputDism = Dism /Online /Add-Package /PackagePath:"$LIPPath\Microsoft-Windows-Client-Language-Pack_x64_$language.cab" /norestart 2>&1
Sometimes it runs fine and installs the package, but more times it fails with fatal error 8000FFFF.
CASE 1. TS script fails
For example with $language = fr-fr I get the Dism.log when executed from the TS script:
8, Info DISM DISM Package Manager: PID=3400 TID=1156 Encountered the option "packagepath" with value "C:\Windows\LanguagePacks\PAS002CD\Microsoft-Windows-Client-Language-Pack_x64_fr-fr.cab" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine
2024-06-04 11:06:39, Info DISM DISM Package Manager: PID=3400 TID=1156 Encountered the option "packagepath" with value "C:\Windows\LanguagePacks\PAS002CD\Microsoft-Windows-Client-Language-Pack_x64_fr-fr.cab" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine
2024-06-04 11:06:39, Info DISM DISM Package Manager: PID=3400 TID=1156 Package Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~fr-FR~10.0.22621.1 with CBS state 0(CbsInstallStateAbsent) being mapped to dism state 1(DISM_INSTALL_STATE_NOTPRESENT) - CDISMPackage::LogInstallStateMapping
2024-06-04 11:06:39, Info DISM DISM Package Manager: PID=3400 TID=1156 Initiating Changes on Package with values: 4, 7 - CDISMPackage::Internal_ChangePackageState
2024-06-04 11:06:40, Info DISM DISM Package Manager: PID=3400 TID=1156 CBS session options=0x100! - CDISMPackageManager::Internal_Finalize
2024-06-04 11:06:48, Info DISM DISM Package Manager: PID=3400 TID=1704 Error in operation: (null) (CBS HRESULT=0x8000ffff) - CCbsConUIHandler::Error
2024-06-04 11:06:48, Error DISM DISM Package Manager: PID=3400 TID=1156 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x8000ffff)
2024-06-04 11:06:48, Error DISM DISM Package Manager: PID=3400 TID=1156 Failed processing package changes with session options - CDISMPackageManager::Internal_ProcessChangesWithOptions(hr:0x8000ffff)
2024-06-04 11:06:48, Info DISM DISM Package Manager: PID=3400 TID=1156 Loaded servicing stack for online use. - CDISMPackageManager::CreateCbsSession
2024-06-04 11:06:48, Info CSI 00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2024-06-04 11:06:48, Info CSI 00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_SUCCESS
2024-06-04 11:06:48, Error DISM DISM Package Manager: PID=3400 TID=1156 Failed while processing command add-package. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x8000ffff)
2024-06-04 11:06:48, Info DISM DISM Package Manager: PID=3400 TID=1156 Further logs for online package and feature related operations can be found at %WINDIR%\logs\CBS\cbs.log - CPackageManagerCLIHandler::ExecuteCmdLine
2024-06-04 11:06:48, Error DISM DISM.EXE: DISM Package Manager processed the command line but failed. HRESULT=8000FFFF
2024-06-04 11:06:48, Info DISM DISM Package Manager: PID=3400 TID=1156 Finalizing CBS core. - CDISMPackageManager::Finalize
2024-06-04 11:06:54, Info DISM DISM Manager: PID=6008 TID=6740 Closing session event handle 0x230 - CDISMManager::CleanupImageSessionEntry
2024-06-04 11:06:54, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.
2024-06-04 11:06:54, Info DISM DISM.EXE:
2024-06-04 11:06:54, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->
The package PAS002CD is already created and downloaded to the system in a previous TS, so it should be there already when the DISM TS is run.
Then if I run manually I get command success, here is the log:
2024-06-04 12:17:36, Info DISM DISM Manager: PID=440 TID=6296 physical location path: C:\ - CDISMManager::CreateImageSession
2024-06-04 12:17:36, Info DISM DISM Manager: PID=440 TID=6296 Event name for current DISM session is Global\{2732AAED-D79B-4D8D-A744-F3DD850BC73B} - CDISMManager::CheckSessionAndLock
2024-06-04 12:17:36, Info DISM DISM Manager: PID=440 TID=6296 Create session event 0x21c for current DISM session and event name is Global\{2732AAED-D79B-4D8D-A744-F3DD850BC73B} - CDISMManager::CheckSessionAndLock
2024-06-04 12:17:36, Info DISM DISM Manager: PID=440 TID=6296 Copying DISM from "C:\Windows\System32\Dism" - CDISMManager::CreateImageSessionFromLocation
2024-06-04 12:17:36, Info DISM DISM Manager: PID=440 TID=6296 No Sandbox was created, DISM running in-place. - CDISMManager::CreateImageSessionFromLocation
2024-06-04 12:17:36, Info DISM DISM Manager: PID=440 TID=6296 Successfully loaded the ImageSession at "C:\Windows\System32\Dism" - CDISMManager::LoadRemoteImageSession
2024-06-04 12:17:36, Info DISM DISM Image Session: PID=12656 TID=9620 Instantiating the Provider Store. - CDISMImageSession::get_ProviderStore
2024-06-04 12:17:36, Info DISM DISM OS Provider: PID=12656 TID=9620 Defaulting SystemPath to C:\ - CDISMOSServiceManager::Final_OnConnect
2024-06-04 12:17:36, Info DISM DISM OS Provider: PID=12656 TID=9620 Defaulting Windows folder to C:\Windows - CDISMOSServiceManager::Final_OnConnect
2024-06-04 12:17:36, Info DISM DISM Provider Store: PID=12656 TID=9620 Attempting to initialize the logger from the Image Session. - CDISMProviderStore::Final_OnConnect
2024-06-04 12:17:36, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2024-06-04 12:17:36, Info DISM DISM Provider Store: PID=12656 TID=9620 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
2024-06-04 12:17:36, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2024-06-04 12:17:36, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2024-06-04 12:17:36, Info DISM DISM Manager: PID=440 TID=6296 Image session successfully loaded from location: C:\Windows\System32\Dism - CDISMManager::CreateImageSession
2024-06-04 12:17:36, Info DISM DISM.EXE: Target image information: OS Version=10.0.22631.2428, Image architecture=amd64
2024-06-04 12:17:36, Info DISM DISM.EXE: Image session version: 10.0.22621.1
2024-06-04 12:17:36, Info DISM DISM Transmog Provider: PID=12656 TID=9620 Current image session is [ONLINE] - CTransmogManager::GetMode
2024-06-04 12:17:36, Info DISM DISM Transmog Provider: PID=12656 TID=9620 Audit Mode: [No] - CTransmogManager::Initialize
2024-06-04 12:17:36, Info DISM DISM Transmog Provider: PID=12656 TID=9620 GetProductType: ProductType = [WinNT] - CTransmogManager::GetProductType
2024-06-04 12:17:36, Info DISM DISM Transmog Provider: PID=12656 TID=9620 Product Type: [WinNT] - CTransmogManager::Initialize
2024-06-04 12:17:36, Info DISM DISM Transmog Provider: PID=12656 TID=9620 Product Type ServerNT : [No] - CTransmogManager::Initialize
2024-06-04 12:17:36, Info CSI 00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2024-06-04 12:17:36, Info CSI 00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_SUCCESS
2024-06-04 12:17:36, Info DISM DISM Driver Manager: PID=12656 TID=9620 Further logs for driver related operations can be found in the target operating system at %WINDIR%\inf\setupapi.offline.log - CDriverManager::Initialize
2024-06-04 12:17:36, Info DISM DISM Package Manager: PID=12656 TID=9620 Finished initializing the CbsConUI Handler. - CCbsConUIHandler::Initialize
2024-06-04 12:17:36, Info DISM DISM Package Manager: PID=12656 TID=9620 CBS is being initialized for online use. More information about CBS actions can be located at: %windir%\logs\CBS\CBS.log - CDISMPackageManager::Initialize
2024-06-04 12:17:36, Info DISM DISM Package Manager: PID=12656 TID=9620 Loaded servicing stack for online use. - CDISMPackageManager::CreateCbsSession
2024-06-04 12:17:36, Info CSI 00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2024-06-04 12:17:36, Info CSI 00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_SUCCESS
2024-06-04 12:17:36, Info DISM DISM Package Manager: PID=12656 TID=9620 Processing the top level command token(add-package). - CPackageManagerCLIHandler::Private_ValidateCmdLine
2024-06-04 12:17:36, Info DISM DISM Package Manager: PID=12656 TID=9620 Attempting to route to appropriate command handler. - CPackageManagerCLIHandler::ExecuteCmdLine
2024-06-04 12:17:36, Info DISM DISM Package Manager: PID=12656 TID=9620 Routing the command... - CPackageManagerCLIHandler::ExecuteCmdLine
2024-06-04 12:17:36, Info DISM DISM Package Manager: PID=12656 TID=9620 Encountered the option "packagepath" with value "C:\Windows\LanguagePacks\PAS002CD\Microsoft-Windows-Client-Language-Pack_x64_fr-fr.cab" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine
2024-06-04 12:17:37, Info DISM DISM Package Manager: PID=12656 TID=9620 Encountered the option "packagepath" with value "C:\Windows\LanguagePacks\PAS002CD\Microsoft-Windows-Client-Language-Pack_x64_fr-fr.cab" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine
2024-06-04 12:17:38, Info DISM DISM Package Manager: PID=12656 TID=9620 Package Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~fr-FR~10.0.22621.1 with CBS state 0(CbsInstallStateAbsent) being mapped to dism state 1(DISM_INSTALL_STATE_NOTPRESENT) - CDISMPackage::LogInstallStateMapping
2024-06-04 12:17:38, Info DISM DISM Package Manager: PID=12656 TID=9620 Initiating Changes on Package with values: 4, 7 - CDISMPackage::Internal_ChangePackageState
2024-06-04 12:17:38, Info DISM DISM Package Manager: PID=12656 TID=9620 CBS session options=0x100! - CDISMPackageManager::Internal_Finalize
2024-06-04 12:19:36, Info CSI 00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2024-06-04 12:19:36, Info CSI 00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_SUCCESS
2024-06-04 12:19:36, Info DISM DISM Package Manager: PID=12656 TID=9620 Finalizing CBS core. - CDISMPackageManager::Finalize
2024-06-04 12:19:45, Info DISM DISM Manager: PID=440 TID=6296 Closing session event handle 0x21c - CDISMManager::CleanupImageSessionEntry
2024-06-04 12:19:45, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.
2024-06-04 12:19:45, Info DISM DISM.EXE:
2024-06-04 12:19:45, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->
From what I know the TS script is run with account SYSTEM and when I run manually is with created local admin account. But SYSTEM account is by design unrestricted and can run anything (also in SCCM the PowerShell policy runs the TS with Bypass, so that is not the issue).
CASE 2. TS scripts runs successfully.
In the rare case it runs without issues I get this from the log:
2024-05-29 08:17:08, Info DISM DISM.EXE: <----- Starting Dism.exe session ----->
2024-05-29 08:17:08, Info DISM DISM.EXE:
2024-05-29 08:17:08, Info DISM DISM.EXE: Host machine information: OS Version=10.0.22631, Running architecture=amd64, Number of processors=36
2024-05-29 08:17:08, Info DISM DISM.EXE: Dism.exe version: 10.0.22621.1
2024-05-29 08:17:08, Info DISM DISM.EXE: Executing command line: "C:\Windows\system32\Dism.exe" /Online /Add-Package /PackagePath:C:\Window\LanguagePacks\PAS002CD\Microsoft-Windows-Client-Language-Pack_x64_es-es.cab /norestart
2024-05-29 08:17:08, Info DISM DISM Manager: PID=12400 TID=5400 physical location path: C:\ - CDISMManager::CreateImageSession
2024-05-29 08:17:08, Info DISM DISM Manager: PID=12400 TID=5400 Event name for current DISM session is Global\{77635C0C-4F9F-4B9E-82C3-7943AFDDEB1F} - CDISMManager::CheckSessionAndLock
2024-05-29 08:17:08, Info DISM DISM Manager: PID=12400 TID=5400 Create session event 0x220 for current DISM session and event name is Global\{77635C0C-4F9F-4B9E-82C3-7943AFDDEB1F} - CDISMManager::CheckSessionAndLock
2024-05-29 08:17:08, Info DISM DISM Manager: PID=12400 TID=5400 Copying DISM from "C:\Windows\System32\Dism" - CDISMManager::CreateImageSessionFromLocation
2024-05-29 08:17:08, Info DISM DISM Manager: PID=12400 TID=5400 No Sandbox was created, DISM running in-place. - CDISMManager::CreateImageSessionFromLocation
2024-05-29 08:17:08, Info DISM DISM Manager: PID=12400 TID=5400 Successfully loaded the ImageSession at "C:\Windows\System32\Dism" - CDISMManager::LoadRemoteImageSession
2024-05-29 08:17:08, Info DISM DISM Image Session: PID=10100 TID=4616 Instantiating the Provider Store. - CDISMImageSession::get_ProviderStore
2024-05-29 08:17:08, Info DISM DISM OS Provider: PID=10100 TID=4616 Defaulting SystemPath to C:\ - CDISMOSServiceManager::Final_OnConnect
2024-05-29 08:17:08, Info DISM DISM OS Provider: PID=10100 TID=4616 Defaulting Windows folder to C:\Windows - CDISMOSServiceManager::Final_OnConnect
2024-05-29 08:17:08, Info DISM DISM Provider Store: PID=10100 TID=4616 Attempting to initialize the logger from the Image Session. - CDISMProviderStore::Final_OnConnect
2024-05-29 08:17:08, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2024-05-29 08:17:08, Info DISM DISM Provider Store: PID=10100 TID=4616 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
2024-05-29 08:17:08, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2024-05-29 08:17:08, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
2024-05-29 08:17:08, Info DISM DISM Manager: PID=12400 TID=5400 Image session successfully loaded from location: C:\Windows\System32\Dism - CDISMManager::CreateImageSession
2024-05-29 08:17:08, Info DISM DISM.EXE: Target image information: OS Version=10.0.22631.2428, Image architecture=amd64
2024-05-29 08:17:08, Info DISM DISM.EXE: Image session version: 10.0.22621.1
2024-05-29 08:17:08, Info DISM DISM Transmog Provider: PID=10100 TID=4616 Current image session is [ONLINE] - CTransmogManager::GetMode
2024-05-29 08:17:08, Info DISM DISM Transmog Provider: PID=10100 TID=4616 Audit Mode: [No] - CTransmogManager::Initialize
2024-05-29 08:17:08, Info DISM DISM Transmog Provider: PID=10100 TID=4616 GetProductType: ProductType = [WinNT] - CTransmogManager::GetProductType
2024-05-29 08:17:08, Info DISM DISM Transmog Provider: PID=10100 TID=4616 Product Type: [WinNT] - CTransmogManager::Initialize
2024-05-29 08:17:08, Info DISM DISM Transmog Provider: PID=10100 TID=4616 Product Type ServerNT : [No] - CTransmogManager::Initialize
2024-05-29 08:17:08, Info CSI 00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2024-05-29 08:17:08, Info CSI 00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_SUCCESS
2024-05-29 08:17:08, Info DISM DISM Driver Manager: PID=10100 TID=4616 Further logs for driver related operations can be found in the target operating system at %WINDIR%\inf\setupapi.offline.log - CDriverManager::Initialize
2024-05-29 08:17:08, Info DISM DISM Package Manager: PID=10100 TID=4616 Finished initializing the CbsConUI Handler. - CCbsConUIHandler::Initialize
2024-05-29 08:17:08, Info DISM DISM Package Manager: PID=10100 TID=4616 CBS is being initialized for online use. More information about CBS actions can be located at: %windir%\logs\CBS\CBS.log - CDISMPackageManager::Initialize
2024-05-29 08:17:08, Info DISM DISM Package Manager: PID=10100 TID=4616 Loaded servicing stack for online use. - CDISMPackageManager::CreateCbsSession
2024-05-29 08:17:08, Info CSI 00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2024-05-29 08:17:08, Info CSI 00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_SUCCESS
2024-05-29 08:17:08, Info DISM DISM Package Manager: PID=10100 TID=4616 Processing the top level command token(add-package). - CPackageManagerCLIHandler::Private_ValidateCmdLine
2024-05-29 08:17:08, Info DISM DISM Package Manager: PID=10100 TID=4616 Attempting to route to appropriate command handler. - CPackageManagerCLIHandler::ExecuteCmdLine
2024-05-29 08:17:08, Info DISM DISM Package Manager: PID=10100 TID=4616 Routing the command... - CPackageManagerCLIHandler::ExecuteCmdLine
2024-05-29 08:17:08, Info DISM DISM Package Manager: PID=10100 TID=4616 Encountered the option "packagepath" with value "C:\Windows\LanguagePacks\PAS002CD\Microsoft-Windows-Client-Language-Pack_x64_es-es.cab" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine
2024-05-29 08:17:09, Info DISM DISM Package Manager: PID=10100 TID=4616 Encountered the option "packagepath" with value "C:\Windows\LanguagePacks\PAS002CD\Microsoft-Windows-Client-Language-Pack_x64_es-es.cab" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine
2024-05-29 08:17:10, Info DISM DISM Package Manager: PID=10100 TID=4616 Package Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~es-ES~10.0.22621.1 with CBS state -17(CbsInstallStateSuperseded) being mapped to dism state 7(DISM_INSTALL_STATE_SUPERSEDED) - CDISMPackage::LogInstallStateMapping
2024-05-29 08:17:10, Info DISM DISM Package Manager: PID=10100 TID=4616 Initiating Changes on Package with values: 4, 7 - CDISMPackage::Internal_ChangePackageState
2024-05-29 08:17:10, Info DISM DISM Package Manager: PID=10100 TID=4616 CBS session options=0x100! - CDISMPackageManager::Internal_Finalize
2024-05-29 08:17:57, Info CSI 00000001 Shim considered [l:126]'\??\C:\Windows\Servicing\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_OBJECT_PATH_NOT_FOUND
2024-05-29 08:17:57, Info CSI 00000002 Shim considered [l:123]'\??\C:\Windows\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.22621.2423_none_e946dbb842dfcc3f\wcp.dll' : got STATUS_SUCCESS
2024-05-29 08:17:57, Info DISM DISM Package Manager: PID=10100 TID=4616 Finalizing CBS core. - CDISMPackageManager::Finalize
2024-05-29 08:18:05, Info DISM DISM Manager: PID=12400 TID=5400 Closing session event handle 0x220 - CDISMManager::CleanupImageSessionEntry
2024-05-29 08:18:05, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.
2024-05-29 08:18:05, Info DISM DISM.EXE:
2024-05-29 08:18:05, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->
I'm not an expert on Dism but maybe someone can interpret this better and how to fix it since this is driving me kind of nuts for a while now. I feel there is something going on while provisioning with SCCM that is preventing the command to run successfully all the time like expected.
Thanks in advance!
Hi,
From what I know the TS script is run with account SYSTEM and when I run manually is with created local admin account.
We could run the script through the psexec tool to simulate the system account.