none
SOLVED: Writing RPi2 image to SD Card: dism Error: 1168 - cannot find element

    Question

  • Hello all,

    I have installed Windows 10 build 10074 (Dutch language) on a PC, no VM.

    I have downloaded and extracted Windows_IoT_Core_RPI2_BUILD.zip

    One of the files extracted is Flash.ffu

    I have established that my SD card is a class 10 and 16 GB

    I open an Administrator command prompt.

    I have established the SD card is seen as "Disk 1" 14 GB size

    I change directory to the directory containing Flash.ffu

    I execute the command:  "dism.exe /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck"

    I receive follwing error:

    Deployment Image Servicing and Management tool
    Version: 10.0.10074.0

    Error: 1168
    Kan element niet vinden.
    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    > "Kan element niet vinden" translates as : "Cannot find element"

    I notice a difference in filename between the extracted "Flash.ffu" and the "flash.ffu" (capital F) so I retry the command as:

    "dism.exe /Apply-Image /ImageFile:Flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck"

    but with same error 1168

    The DISM log entry follows below.

    Anyone encountering the same issue, and better still, have found a solution?

    Many thanks!

    Ralph

    DISM log file entry:

    2015-05-02 13:36:06, Info                  DISM   PID=4348 TID=4092 Scratch directory set to 'C:\Users\ralph\AppData\Local\Temp\'. - CDISMManager::put_ScratchDir
    2015-05-02 13:36:06, Info                  DISM   PID=4348 TID=4092 DismCore.dll version: 10.0.10074.0 - CDISMManager::FinalConstruct
    2015-05-02 13:36:06, Info                  DISM   PID=4348 TID=4092 Successfully loaded the ImageSession at "C:\Windows\System32\Dism" - CDISMManager::LoadLocalImageSession
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Finished initializing the Provider Map. - CDISMProviderStore::Final_OnConnect
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Manager: PID=4348 TID=4092 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE:
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: <----- Starting Dism.exe session ----->
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE:
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Host machine information: OS Version=10.0.10074, Running architecture=amd64, Number of processors=2
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Dism.exe version: 10.0.10074.0
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Executing command line: dism.exe  /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\FolderProvider.dll - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\WimProvider.dll - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\VHDProvider.dll - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\VHDProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\ImagingProvider.dll - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\ImagingProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\CompatProvider.dll - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\CompatProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\FfuProvider.dll - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\FfuProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FolderManager
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: WimManager
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: WimManager.
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: VHDManager
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: GenericImagingManager
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: GenericImagingManager.
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: Compatibility Manager.
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FfuManager
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Getting Provider GenericImagingManager - CDISMProviderStore::GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Getting Provider FfuManager - CDISMProviderStore::GetProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
    2015-05-02 13:36:06, Error                 DISM   DISM Imaging Provider: PID=4348 TID=4092 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:2546 - CGenericImagingManager::InternalCmdFFUApply(hr:0x80070490)
    2015-05-02 13:36:06, Error                 DISM   DISM Imaging Provider: PID=4348 TID=4092 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:535 - CGenericImagingManager::ExecuteCmdLine(hr:0x80070490)
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE:
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE: <----- Ending Dism.exe session ----->
    2015-05-02 13:36:06, Info                  DISM   DISM.EXE:
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Found the OSServices.  Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: VHDManager - CDISMProviderStore::Internal_DisconnectProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: GenericImagingManager - CDISMProviderStore::Internal_DisconnectProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: FfuManager - CDISMProviderStore::Internal_DisconnectProvider
    2015-05-02 13:36:06, Info                  DISM   DISM Provider Store: PID=4348 TID=4092 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider


    • Edited by PA1RB Thursday, May 14, 2015 6:16 PM
    Saturday, May 02, 2015 11:44 AM

Answers

  • According to my research FfuProvider.dll checks this values and fails if one of them is empty.
    This is the only reason why dism fails with 1168 error on a Hyper-V virtual machine.

    You can patch x86 version of FfuProvider.dll with HEX editor.
    File offset 0x7312, replace B8 90 04 07 80 with B8 00 00 00 00 (valid for 10074 and 10075)

    Be sure you are patch and use an appropriate version of x86 dism:

    10074
    C:\windows\SysWOW64\Dism.exe
    C:\windows\SysWOW64\dism\FfuProvider.dll
    To replace this file you have to become his owner and modify access rights.

    10075
    C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\x86\DISM\dism.exe
    C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\x86\DISM\ffuprovider.dll

    Paths is for x64 windows system.

    Be careful: dism can rewrite any drive, including the system drive of running system if you specify its number in \\.\PhysicalDriveN
    • Edited by komarov.biz Thursday, May 14, 2015 9:20 AM
    • Marked as answer by PA1RB Thursday, May 14, 2015 6:14 PM
    Thursday, May 14, 2015 8:54 AM
  • I'm very sorry to hear that you are still experiencing this issue.  Please know that we are looking into it and hope to have a solution or work-around available for you soon.

    The only other suggestion I can think of at the moment is if you could borrow a friends laptop that has a SD card reader built in you might get better results that way.


    Jonathan Tanner | Microsoft | Windows 10 IoT Core Insider Preview Support | This posting is provided 'as is' with no warranties and confers no rights.

    • Marked as answer by PA1RB Saturday, May 09, 2015 9:04 AM
    Thursday, May 07, 2015 6:00 PM
    Moderator
  • OK, today I copied the Flash.ffu file to a Surface PRO 3 running Windows 10 build 10074.

    I have succesfully flashed two SD cards (SanDisk Ultra microSDHC UHS-1 cards with 8 GB, class 10) with the dism.exe on that Surface (dism version 10.0.10074.0).

    The first card I flashed using the build-in micro SD-card reader of the Surface. The second card I flashed using the exact same USB cardreader that does not work on my other computer (recognized by wmic as ChipBank SD/MM Reader USB Device).

    So the USB reader works on the Surface, but does not work on my other computer.

    The Windows 10 builds are both 10074, but the Surface runs the English language, the other computer runs the Dutch language.

    The computer on which the USB stick does not work is based on an ASUS P5LD2-VM motherboard (using the build in USB ports).

    So I will be off playing with the RPI-2 this weekend, but I will keep an eye out for the solution to the issue in this forum.

    Happy to provide more details if required by the engineers!


    Friday, May 08, 2015 4:20 PM
  • Hi,

    I had a similar problem with the above mentioned error. I tested all recomended methods/solutions with two USB card readers and three SD cards (class 10) but with no success. Now I installed Windows on the laptop that has SD card reader built in, as recomended above, and it works fine. Thanks for the tip!

    • Marked as answer by PA1RB Saturday, May 09, 2015 9:04 AM
    Saturday, May 09, 2015 8:13 AM
  • Hello MiPiGamer,

    The page with instructions is here: http://ms-iot.github.io/content/win10/SetupRPI.htm

    The package including the image can be downloaded in step 3: Download the package "Windows 10 IoT Core Insider Preview Image for Raspberry Pi 2" from Microsoft Connect (you must be signed in to Microsoft Connect).

    Aside from the issue above writing the image, all went according to the description, and "Blinky" made the LED blink!

    • Marked as answer by PA1RB Sunday, May 10, 2015 8:49 PM
    Sunday, May 10, 2015 8:49 PM
  • Wow - that did the trick allright:

    Deployment Image Servicing and Management tool
    Version: 10.0.10074.0
    Applying image
    [==========================100.0%==========================]
    The operation completed successfully.

    I confirm this patch absolutely fixed the issue, well done and many thanks indeed !!!

    Hope this finds its way into the next release of Windows 10.

    Ralph

    • Marked as answer by PA1RB Thursday, May 14, 2015 6:14 PM
    Thursday, May 14, 2015 6:14 PM

All replies

  • Same problem here.
    - I tried with two different SDcard readers - no difference.
    - I tried with different / bigger card - no difference.

    Saturday, May 02, 2015 3:03 PM
  • I'm also having the same issue on a physical machine.  I have 64bit Windows 10 installed on a VMWare VM and was a able to mount the SD and burn it on the VM.  It boots on the Raspberry Pi however it never gets past the blue windows logo.
    Sunday, May 03, 2015 1:44 PM
  • I'm having almost same issue. I tried dism.exe using 64bit Windows 10 on VMware and I got following error log,

    2015-05-03 23:45:04, Error                 DISM   DISM Imaging Provider: PID=836 TID=3388 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:2546 - CGenericImagingManager::InternalCmdFFUApply(hr:0x80070002)
    2015-05-03 23:45:04, Error                 DISM   DISM Imaging Provider: PID=836 TID=3388 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:535 - CGenericImagingManager::ExecuteCmdLine(hr:0x80070002)

    I can't solve this issue yet.

    Sunday, May 03, 2015 3:31 PM
  • I could solve my issue.
    In my case, the following command doesn't work correctly,
    dism.exe /Apply-Image /ImageFile:Flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck
    , but next command work fine,
    dism.exe /Apply-Image /ImageFile:.\Flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck

    The file "Flash.ffu" is located at current directory, and I changed the /ImageFile parameter from /ImageFile:Flash.ffu to /ImageFile:.\Flash.ffu
    Monday, May 04, 2015 11:14 AM
  • Good to hear you were able to solve your issue Hiro!

    Unfortunately using the argument "/ImageFile:.\Flash.ffu" did not do the trick in my case, the same error 1168 appears.

    I tried "dir .\F*" in the current directory and that returned:

    02-05-2015  01:05       841.744.384 Flash.ffu
                   1 File(s)    841.744.384 bytes
                   0 Dir(s)  686.945.538.048 bytes free

    So the image file is found OK.

    I am using a card reader attached to a USB port:

    Microsoft DiskPart version 10.0.10074
    Copyright (C) 1999-2013 Microsoft Corporation.
    On computer: WIN-3KQVV14J8PT
    DISKPART> list disk
      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          698 GB      0 B
      Disk 1    Online         7600 MB      0 B
    DISKPART>

    So the target SD-card also seems OK as well and should be accessible as "/ApplyDrive:\\.\PhysicalDrive1" I guess?

    I would very much welcome suggestions!

    Ralph

    Monday, May 04, 2015 6:49 PM
  • One option to try would be to use the complete path to your FFU file, so "/ImageFile:C:\TEMP\Flash.ffu" or something like that.

    The other thing to check is that you have access to the FFU file and no anti-virus program or something else is blocking your ability to access it as a security measure.

    Hopefully one of these will help.


    Jonathan Tanner | Microsoft | Windows 10 IoT Core Insider Preview Support | This posting is provided 'as is' with no warranties and confers no rights.

    Tuesday, May 05, 2015 12:48 AM
    Moderator
  • Hi guys,

    thx for all the reports and the detailed info. We're looking at this info here in Microsoft, and we'll reach out with some more data and (maybe) some extra questions.

    Ale Contenti | Microsoft | Windows IoT Dev Lead

    Tuesday, May 05, 2015 7:23 AM
  • Hello Jonathan,

    Thank you for your suggestion. I tried the command, which in my case looks like this (including the prompt):

    C:\Users\ralph\Development\Microsoft\Windows_IoT_Core_RPI2_BUILD>dism.exe /Apply-Image /ImageFile:C:\Users\ralph\Development\Microsoft\Windows_IoT_Core_RPI2_BUILD\Flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck

    Unfortunately same error 1168.

    As this is a very long name I also moved the file to the root directory and tried it from there: Same error unfortunately.

    Regards,

    Ralph

    Tuesday, May 05, 2015 7:53 PM
  • Can you try re-formatting your SD Card first? (Or using a different one?) The reason I ask was that in your first log it gave this error:

    I see this in the first log:

     

    2015-05-02 13:36:06, Error                 DISM   DISM Imaging Provider: PID=4348 TID=4092 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:2546 - CGenericImagingManager::InternalCmdFFUApply(hr:0x80070490)

    2015-05-02 13:36:06, Error                 DISM   DISM Imaging Provider: PID=4348 TID=4092 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:535 - CGenericImagingManager::ExecuteCmdLine(hr:0x80070490)

     

    And I noticed that 0x80070490 points to disk corruption?

     

    http://blogs.msdn.com/b/andrekl/archive/2008/09/29/how-to-overcome-error-0x80070490-when-installing-updates-in-windows-vista-server-2008.aspx

     

      The other error you get later on could be indicative of a 64 bit vs. 32 bit issue, or the file not being found.  Using the explicit path as you did above should help to avoid that particular problem.


    Jonathan Tanner | Microsoft | Windows 10 IoT Core Insider Preview Support | This posting is provided 'as is' with no warranties and confers no rights.

    Wednesday, May 06, 2015 12:14 AM
    Moderator
  • OK, I went out and bought a brand new SanDisk Ultra microSDHC UHS-1 card with 8 GB, class 10.

    It is attached through a USB stick:

    DISKPART> list disk

      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          698 GB      0 B
      Disk 1    Online         7580 MB      0 B

    Unfortunately the error remains the same:

    C:\>dism.exe /Apply-Image /ImageFile:Flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck
    Deployment Image Servicing and Management tool
    Version: 10.0.10074.0

    Error: 1168
    Kan element niet vinden.
    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    When I change the argument to /ImageFile:ABCFlash.ffu (a file which does not exist) the error becomes:

    Error: 0xffffffff - DISM failed. No operation was performed.

    So that indicates the source file is recognized well.

    (Interestingly enough when I change the argument to /ImageFile:flash.ffu the error is also:

    Error: 1168 - Kan element niet vinden. (cannot find element)

    So apparantly it does not matter if the the filename argument is written with a capital F or not, the file is recognized anyway...)

    Still open for suggestions!

    Ralph



    • Edited by PA1RB Wednesday, May 06, 2015 4:33 PM
    Wednesday, May 06, 2015 4:30 PM
  • Just noticed, DISKPART reports 0 B free for both disks.

    However in Windows File Explorer 7,39 GB is reported free for the SD-card

    (and it is formatted FAT32 out of the box)

    Wednesday, May 06, 2015 5:25 PM
  • I installed ADK from https://go.microsoft.com/fwlink/p/?LinkId=526740 and tried the newer release of DISM it contains. Unfortunately the same error:

    Deployment Image Servicing and Management tool
    Version: 10.0.10075.0

    Error: 1168

    Kan element niet vinden. (cannot find element)

    The ADK also includes the Image Flashing Tool. This tool does find the Flash.ffu file OK, but does not show the SD card as a potential target to flash, despite the fact that this SD card is perfectly recognized in windows file explorer as drive D:

    I also tried an alternative SD-card reader and an alternative USB port, but same behaviour.

    Wednesday, May 06, 2015 8:36 PM
  • Hi,

    could you try running:

    "wmic diskdrive list brief"

    this lists physical disks.

    Just wanted to verify the SD card is truly "\\.\PhysicalDrive1".

    Thanks

    Thursday, May 07, 2015 12:54 AM
  • C:\Users\ralph>wmic diskdrive list brief
    Caption                           DeviceID            Model                             Partitions  Size
    ChipBank SD/MM Reader USB Device  \\.\PHYSICALDRIVE1  ChipBank SD/MM Reader USB Device  1           7945620480
    SAMSUNG HD753LJ ATA Device        \\.\PHYSICALDRIVE0  SAMSUNG HD753LJ ATA Device        2           750153761280

    DISKPART> list disk
      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          698 GB      0 B
      Disk 1    Online         7580 MB      0 B
    DISKPART>

    Thanks for working on this guys, much appreciated!

    Thursday, May 07, 2015 5:49 AM
  • Just tried the command:

    dism.exe /Apply-Image /ImageFile:Flash.ffu /ApplyDrive:\\.\PHYSICALDRIVE1 /SkipPlatformCheck

    Unfortunately same error 1168

    Ralph

    Thursday, May 07, 2015 5:55 AM
  • I'm very sorry to hear that you are still experiencing this issue.  Please know that we are looking into it and hope to have a solution or work-around available for you soon.

    The only other suggestion I can think of at the moment is if you could borrow a friends laptop that has a SD card reader built in you might get better results that way.


    Jonathan Tanner | Microsoft | Windows 10 IoT Core Insider Preview Support | This posting is provided 'as is' with no warranties and confers no rights.

    • Marked as answer by PA1RB Saturday, May 09, 2015 9:04 AM
    Thursday, May 07, 2015 6:00 PM
    Moderator
  • OK, today I copied the Flash.ffu file to a Surface PRO 3 running Windows 10 build 10074.

    I have succesfully flashed two SD cards (SanDisk Ultra microSDHC UHS-1 cards with 8 GB, class 10) with the dism.exe on that Surface (dism version 10.0.10074.0).

    The first card I flashed using the build-in micro SD-card reader of the Surface. The second card I flashed using the exact same USB cardreader that does not work on my other computer (recognized by wmic as ChipBank SD/MM Reader USB Device).

    So the USB reader works on the Surface, but does not work on my other computer.

    The Windows 10 builds are both 10074, but the Surface runs the English language, the other computer runs the Dutch language.

    The computer on which the USB stick does not work is based on an ASUS P5LD2-VM motherboard (using the build in USB ports).

    So I will be off playing with the RPI-2 this weekend, but I will keep an eye out for the solution to the issue in this forum.

    Happy to provide more details if required by the engineers!


    Friday, May 08, 2015 4:20 PM
  • I'm very glad to hear you've been able to get unblocked for the time being.  I've passed along this update to the product team and will let you know if they do request any other information.

    Thanks again and have a good weekend.


    Jonathan Tanner | Microsoft | Windows 10 IoT Core Insider Preview Support | This posting is provided 'as is' with no warranties and confers no rights.

    Friday, May 08, 2015 11:54 PM
    Moderator
  • Hi,

    I had a similar problem with the above mentioned error. I tested all recomended methods/solutions with two USB card readers and three SD cards (class 10) but with no success. Now I installed Windows on the laptop that has SD card reader built in, as recomended above, and it works fine. Thanks for the tip!

    • Marked as answer by PA1RB Saturday, May 09, 2015 9:04 AM
    Saturday, May 09, 2015 8:13 AM
  • Where did you find the zip folder?
    Sunday, May 10, 2015 9:56 AM
  • Hello MiPiGamer,

    The page with instructions is here: http://ms-iot.github.io/content/win10/SetupRPI.htm

    The package including the image can be downloaded in step 3: Download the package "Windows 10 IoT Core Insider Preview Image for Raspberry Pi 2" from Microsoft Connect (you must be signed in to Microsoft Connect).

    Aside from the issue above writing the image, all went according to the description, and "Blinky" made the LED blink!

    • Marked as answer by PA1RB Sunday, May 10, 2015 8:49 PM
    Sunday, May 10, 2015 8:49 PM
  • Hello PA1RB,

    Could you please check the following script on both machines (Windows 10 build 10074 (Dutch language) installed and Surface PRO 3):

    On Error Resume Next
    strMessage = ""
    Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
    Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48)
    For Each objItem in colItems
        strMessage = strMessage & "Vendor: """ & objItem.Vendor & """" & vbCrLf
        strMessage = strMessage & "Name: """ & objItem.Name & """" & vbCrLf
        strMessage = strMessage & "Version: """ & objItem.Version & """" & vbCrLf
        strMessage = strMessage & "IdentifyingNumber: """ & objItem.IdentifyingNumber & """" & vbCrLf
    Next
    
    Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
    For Each objItem in colItems
        strMessage = strMessage & "SystemSKUNumber: """ & objItem.SystemSKUNumber & """" & vbCrLf
    Next
    Wscript.Echo strMessage

    Just save it as .vbs file and run.

    Does this message contain empty string for some of values on PC and does not on Surface PRO 3?

    Wednesday, May 13, 2015 12:52 PM
  • Hi,

    I had a similar problem with the above mentioned error. I tested all recomended methods/solutions with two USB card readers and three SD cards (class 10) but with no success. Now I installed Windows on the laptop that has SD card reader built in, as recomended above, and it works fine. Thanks for the tip!

    Note, I have a laptop with this built in and am getting this error too due to DISM.log error:

    2015-05-13 12:58:34, Info                  DISM   DISM Provider Store: PID=4184 TID=5632 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
    2015-05-13 12:58:34, Error                 DISM   DISM Imaging Provider: PID=4184 TID=5632 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:2546 - CGenericImagingManager::InternalCmdFFUApply(hr:0x80070490)
    2015-05-13 12:58:34, Error                 DISM   DISM Imaging Provider: PID=4184 TID=5632 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:535 - CGenericImagingManager::ExecuteCmdLine(hr:0x80070490)
    2015-05-13 12:58:34, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.

    I spent quite a lot of time loading Windows 10 on an older laptop because of the requirement to use the DISM from there, so to result in this error is not ideal.

    This is with the SD card recommended from the IoT webpage too.

    Would be good for an OS update to fix this bug.

    There is a suggestion of how to do it from Win7+ here:

    http://forum.xda-developers.com/raspberry-pi/general/flashing-windows-10-core-to-raspberry-t3097894

    Guess I'll be trying that next.

    Wednesday, May 13, 2015 6:28 PM
  • OK, I ran the script on the troubled PC (ASUS P5LD2-VM motherboard with Dutch OS language) and found following in the Windows Script Host pop-up:

    Vendor: "stem manufacturer"

    Name: "System Product Name"

    Version: "System Version"

    IdentifyingNumber: "System Serial Number"

    SystemSKUNumber: ""

    >> the Vendor: line shows exactly as above "stem manufacturer"

    >> SystemSKUNumber is an empty string.

    Unfortunately the Surface PRO 3 is not mine, I can test that one only next week.

    Wednesday, May 13, 2015 7:10 PM
  • According to my research FfuProvider.dll checks this values and fails if one of them is empty.
    This is the only reason why dism fails with 1168 error on a Hyper-V virtual machine.

    You can patch x86 version of FfuProvider.dll with HEX editor.
    File offset 0x7312, replace B8 90 04 07 80 with B8 00 00 00 00 (valid for 10074 and 10075)

    Be sure you are patch and use an appropriate version of x86 dism:

    10074
    C:\windows\SysWOW64\Dism.exe
    C:\windows\SysWOW64\dism\FfuProvider.dll
    To replace this file you have to become his owner and modify access rights.

    10075
    C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\x86\DISM\dism.exe
    C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\x86\DISM\ffuprovider.dll

    Paths is for x64 windows system.

    Be careful: dism can rewrite any drive, including the system drive of running system if you specify its number in \\.\PhysicalDriveN
    • Edited by komarov.biz Thursday, May 14, 2015 9:20 AM
    • Marked as answer by PA1RB Thursday, May 14, 2015 6:14 PM
    Thursday, May 14, 2015 8:54 AM
  • I have patched C:\Windows\SysWOW64\Dism\FfuProvider.dll version 10074, the line now reads:

    00007310  EB BE B8 00 00 00 00 EB   2E 8B 55 10 8D 45 E8

    My machine is not Hyper-V, it is a regular Windows 10 install on bare metal.

    I checked the SD-card and it is known as Disk 1, and then I executed the command:

    dism.exe /Apply-Image /ImageFile:Flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck

    Unfortunately, the result is still error 1168

    I very much appreciate the support nevertheless!

    Ralph


    • Edited by PA1RB Thursday, May 14, 2015 5:00 PM
    Thursday, May 14, 2015 4:57 PM
  • Did you specify the full path to x86 dism?

    "C:\windows\SysWOW64\Dism.exe" /Apply-Image /ImageFile:Flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck

    Thursday, May 14, 2015 6:02 PM
  • Wow - that did the trick allright:

    Deployment Image Servicing and Management tool
    Version: 10.0.10074.0
    Applying image
    [==========================100.0%==========================]
    The operation completed successfully.

    I confirm this patch absolutely fixed the issue, well done and many thanks indeed !!!

    Hope this finds its way into the next release of Windows 10.

    Ralph

    • Marked as answer by PA1RB Thursday, May 14, 2015 6:14 PM
    Thursday, May 14, 2015 6:14 PM
  • Thanks Hiro, you solved the problem!!
    Saturday, May 16, 2015 10:12 AM
  • Like PA1RB I initially had problems with a USB card reader. But following Paul Thurrott's instructions

    https://www.thurrott.com/windows/windows-10/3492/install-and-configure-windows-10-insider-preview-on-raspberry-pi-2

    It worked first time with my USB card reader.

    Shutdown reboots same as restart.


    Davy-D II formerly Davy-D



    • Edited by Davy-D II Tuesday, May 19, 2015 5:12 PM
    Monday, May 18, 2015 9:45 AM
  • I followed the only instructions. Dism.exe stuf and it did not work.

    Is there another set of instructions or method to put the stuff on the SD card?

    Or do i have to format the card first?

    Tuesday, May 19, 2015 4:51 AM
  • Hi Lawrence - can you provide more information about what's going on?  Did you try formatting the card first to see if that works?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, May 20, 2015 6:22 PM
  • While this is a long discussion thread it does cover a majority of the things people have found to get this working correctly:

    https://social.msdn.microsoft.com/Forums/en-US/f185adeb-107f-4624-8d4b-dea4a0562dbd/solved-writing-rpi2-image-to-sd-card-dism-error-1168-cannot-find-element?forum=WindowsIoT

    1. Make sure you are using either an 8 or 16 GB Class 10 SD card.
    2. Make sure you are using the version of DISM that is included with Windows 10 Technical Preview.  If you are using an older version it will not work.

    For other issues, just review that thread above.


    Jonathan Tanner | Microsoft | Windows 10 IoT Core Insider Preview Support | This posting is provided 'as is' with no warranties and confers no rights.

    Wednesday, May 20, 2015 8:44 PM
    Moderator
  • I placed the flash.ffu file on my desktop and was getting pretty much the same DISM log as you. Then I figured the flash.ffu file was way up-stream of the dism.exe execute point which was located in:  C:\Program files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools> (for me). So I put a copy of flash.ffu file into the Deployment Tools folder and let'er rip. Burned to the SD-card jis'fine. 
    Now, on to the next road block.
    • Edited by HyLite Wednesday, June 03, 2015 11:03 PM
    Wednesday, June 03, 2015 11:01 PM
  • Would be willing to make the 8G Image available for download? 
    Saturday, June 06, 2015 11:51 PM
  • I'm having almost same issue. I tried dism.exe using 64bit Windows 10 on VMware and I got following error log,

    2015-05-03 23:45:04, Error                 DISM   DISM Imaging Provider: PID=836 TID=3388 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:2546 - CGenericImagingManager::InternalCmdFFUApply(hr:0x80070002)
    2015-05-03 23:45:04, Error                 DISM   DISM Imaging Provider: PID=836 TID=3388 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:535 - CGenericImagingManager::ExecuteCmdLine(hr:0x80070002)

    I can't solve this issue yet.

    For future readers, I got this exact issues (note the hr:0x80070002 error code, specifically) and the cause was a corrupted flash.ffu file.  Somehow 7-Zip corrupted it during extraction, which is the first time that's ever happened for me in years of use.

    Anyway, re-extraction fixed it, and it applied without issue.

    Monday, June 22, 2015 7:31 PM
  • I have the same problem I cannot apply the image to an sd card size 14GB+

    My Windows 10 PC recently updated to build 10162, when I run dism from different folders I get different error messages. This suggests to me the IoT needs to match the operating system or some component is missing.

    I don't intend trying the hex editing the dism file to remove whatever was suggested.

    C:\TEMP>"c:\Program Files (x86)\Microsoft IoT\Dism\dism.exe" /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDrive1  /SkipPlatformCheck
    Deployment Image Servicing and Management tool
    Version: 10.0.10065.0
    Error: 1168
    Element not found.
    The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

    C:\TEMP>dism.exe /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDrive1  /SkipPlatformCheck
    Deployment Image Servicing and Management tool
    Version: 10.0.10162.0
    Error: 1168
    Element not found.
    The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

    C:\Program Files (x86)\Microsoft IoT\Dism>dism.exe /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDrive1  /SkipPlatformCheck
    Deployment Image Servicing and Management tool
    Version: 10.0.10065.0
    Error: 0xffffffff
    DISM failed. No operation was performed.
    For more information, review the log file.
    The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

    Monday, July 06, 2015 6:42 AM
  • unfortunately it didn't help me, still same error

    PS C:\Program Files (x86)\Microsoft IoT\FFU\RaspberryPi2> C:\windows\SysWOW64\Dism.exe /Apply-Image /ImageFile:Flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck
    Deployment Image Servicing and Management tool
    Version: 10.0.10162.0

    Error: 1168
    Element not found.

    The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

    My windows is in english and build is 10162


    Wednesday, July 08, 2015 8:18 PM
  • After several tries and lots on bing-ing about I realised that I had a Windows 10 Server installed so I used that to deploy it the image with NO problems

    This suggests to me either I have a problem with my original PC, or the image is specific to some versions of DISM / Windows 10 builds, but it seems its just another bug to be ironed out before the end of the month

    <pre>
    dism.exe /Apply-Image /ImageFile:.\flash.ffu /ApplyDrive:\\.\PhysicalDrive5  /SkipPlatformCheck
    
    Deployment Image Servicing and Management tool
    Version: 10.0.10074.0
    
    Applying image
    [==========================100.0%==========================]
    The operation completed successfully.
    </pre>

    Tuesday, July 14, 2015 12:30 PM
  • I am using DISM.EXE Version 10.0.10240.

    I get this same Error 1168 when attempting to write the Windows 10 image to my SD Card.

    The Hex Edits advised earlier are most likely not valid for my FFUPROVIDER.DLL which is also version 10.0.10240.

    Can I get advice on a good Hex Editor? Is there one within Visual Studio 2015? (if there is, it's not obvious)

    Windows 10 General Release 10.0.10240(32 bit)

    Saturday, August 29, 2015 2:18 AM