Media Wizard Error: Sequence contains no elements when creating USB media

If you are creating USB media in the Media Wizard and get the error "Sequence contains no elements" you'll need to try a diskpart clean and format of the USB drive.

This error typically occurs when the USB drive has existing partitions, file systems, or data that interfere with the formatting process. Older or previously used USB drives are more likely to encounter this issue.

From an elevated command prompt, run the following:

diskpart
list disk  [determine which disk is your external USB stick, probably disk 1]
select disk 1  [use the correct disk number here]
detail disk  [read the disk info; make sure you have your USB stick selected]
clean  [this destroys all data and partition/volume info on the selected disk]
create partition primary
active
format quick fs=ntfs  [Media Wizard will convert this to FAT32 later]
assign
exit

Then run the Media Wizard again.

If you continue to experience issues, try these additional troubleshooting steps:

  • Remove all existing files from the C:\SmartDeploy\Scratch\ directory (do not delete the Scratch directory itself, just the child files and folders).
  • Temporarily disable any antivirus software that might be interfering with USB drive access
  • Ensure no other applications are accessing the USB drive
  • Try using a different USB drive if available
  • Restart your computer to clear any transitory issues before attempting media creation again
Was this article helpful?
Still have a question or want to share what you have learned? Visit our Community Discord to get help and collaborate with others.