New
#1
DISM: The system cannot find the file specified when the file exists.
I used the following lines in a CMD script:
According to theCode:If exist "D:\CAB\WinPE-FontSupport-ZH-TW.cab" (echo The font file exists. >> "%Log%") If exist "D:\CAB\lp.cab" (echo The lp file exists. >> "%Log%") DISM /image:%X% /add-package /packagepath:"D:\CAB\WinPE-FontSupport-ZH-TW.cab" /LogPath="%Log%" DISM /image:%X% /add-package /packagepath:"D:\CAB\lp.cab" /LogPath="%Log%""%Log%"
file, the two .cab files actually existed. However, I have got the following errors:
Why couldn't the system find the files, which definitely existed?Code:An error occurred trying to open - D:\CAB\WinPE-FontSupport-ZH-TW.cab Error: 0x80070002 Error: 2 The system cannot find the file specified. The DISM log file can be found at D:\Windows PE\WinPE_log.log Deployment Image Servicing and Management tool Version: 10.0.18362.1 Image Version: 10.0.18362.30 An error occurred trying to open - D:\CAB\lp.cab Error: 0x80070002 Error: 2 The system cannot find the file specified.
"WinPE_log.log" gives the following info:
Code:2020-07-30 18:22:46, Error CBS Cannot create a package on a session that has not been initialized. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND] 2020-07-30 18:22:46, Info CBS Failed to create windows update package [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND] 2020-07-30 18:22:46, Error DISM DISM Package Manager: PID=2328 TID=888 Failed opening package. - CDISMPackageManager::Internal_CreatePackageByPath(hr:0x80070002) 2020-07-30 18:22:46, Error DISM DISM Package Manager: PID=2328 TID=888 Failed to get the underlying CBS package. - CDISMPackageManager::OpenPackageByPath(hr:0x80070002) 2020-07-30 18:22:46, Error DISM DISM Package Manager: PID=2328 TID=888 Failed to open the package at location: "D:\CAB\WinPE-FontSupport-ZH-TW.cab" - CPackageManagerCLIHandler::ProcessPackagePath(hr:0x80070002) 2020-07-30 18:22:46, Error DISM DISM Package Manager: PID=2328 TID=888 Failed while processing command add-package. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x80070002) 2020-07-30 18:22:46, Error DISM DISM.EXE: DISM Package Manager processed the command line but failed. HRESULT=80070002
When I manually run the following via Command Prompt, the .cab files will be opened.
D:\CAB\WinPE-FontSupport-ZH-TW.cab
D:\CAB\lp.cab
Command Prompt can find the two .cab files as shown below:
Code:C:\Windows\system32>Dir /a "D:\CAB" Volume in drive D is Data Volume Serial Number is 0D22-074F Directory of D:\CAB 30/07/2020 05:06 PM <DIR> . 30/07/2020 05:06 PM <DIR> .. 19/03/2019 02:14 AM 3,746,171 lp.cab 18/03/2019 07:40 PM 30,762,803 WinPE-FontSupport-ZH-TW.cab 2 File(s) 34,508,974 bytes 2 Dir(s) 328,587,554,816 bytes free
Last edited by Matthew Wai; 30 Jul 2020 at 07:15.