DISM: The system cannot find the file specified when the file exists.


  1. Posts : 7,606
    Windows 10 Home 20H2
       #1

    DISM: The system cannot find the file specified when the file exists.


    I used the following lines in a CMD script:
    Code:
    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%"
    According to the "%Log%" file, the two .cab files actually existed. However, I have got the following errors:
    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.
    Why couldn't the system find the files, which definitely existed?
    "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.
      My Computer


  2. Posts : 42,946
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Might mean DISM can't process that particular file... an educated guess based on the limited education provided by reading this:
    https://social.technet.microsoft.com...w7itproinstall
      My Computers


  3. Posts : 7,606
    Windows 10 Home 20H2
    Thread Starter
       #3

    DISM can add languages as per Microsoft: https://docs.microsoft.com/en-us/win...cks-to-windows
    Both files were downloaded from Microsoft: https://docs.microsoft.com/zh-tw/win...install#winADK
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:30.
Find Us




Windows 10 Forums