2

Is there some way to natively create a .iso file from a partition or directory via Windows CMD? From what I gather the answer is no, but coming from Linux, where dd accomplishes this so easily, it seems like there must be a way?

Maybe somehow piping robocopy or xcopy to a file or something?

Certainly there are third-party solutions, but I'm just asking about doing this out-of-the-box.

Flyk
  • 1,549
Michael
  • 23

3 Answers3

9

I prefer the Microsoft’s own “CD-ROM and DVD-ROM Premastering Utility”, CDImage. It allows for fairly complete control over the options, including making the disc bootable, and it is easy to use.

CDImage is not an officially released program (ie, not on Microsoft Downloads), but it is easy to find it, as well as some front-ends for it—which often come with a copy of CDImage.


I also made myself a couple of batch files called makecd.bat and makedvd.bat with the appropriate switches to simplify it even further for the more common images I make:

> MakeCDVD.bat  LABEL TARGET [SOURCE] [-bBOOTIMG]
> 
> CD  Switches: -l<LABEL> -h -j1 -x -m <TARGET>
> DVD Switches: -l<LABEL> -h -u1       <TARGET>
Synetech
  • 68,827
  • 3
    What the hell is wrong with hit-and-run down-voters. I have no clue what the problem is, so unless they leave a comment explaining why a perfectly valid answer to the question is not good, then I will continue to assume that it is correct and not bother to change it. – Synetech Feb 12 '12 at 06:44
  • Thanks! I was unaware of CDImage, and it looks like it do nicely. – Michael Feb 13 '12 at 03:06
3

The two most 'native' solutions I could find are:

oscdimg.exe

The command line tool oscdimg.exe is installed as part of the 'Deployment Tools' feature in the Windows ADK (https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install). It allows the user to create an iso of a given folder by executing the following command:

oscdimg DIRECTORYPATH OUTPUTNAME.ISO

New-ISOFile

Microsoft PFE, Chris Wu, has created a Powershell function which uses the IFileSystemImage interface native to Windows to wrap files or folders into an iso file, his code can be found here: https://gallery.technet.microsoft.com/scriptcenter/New-ISOFile-function-a8deeffd

  • The TechNet link is dead now, but various people have posted the code, just search for "New-IsoFile". At this moment, this is where I got it from. – Paul Jul 30 '21 at 06:46
  • Just extracted oscdimg.exe from W10 ADK, you can grab the files here Oscdimg.7z (I know, don't run binaries from a stranger, it's on your own risk) – MrCalvin Oct 04 '22 at 16:45
  • This Powershell script is looking good: https://github.com/wikijm/PowerShell-AdminScripts/blob/master/Miscellaneous/New-IsoFile.ps1 – Oğuzhan Kahyaoğlu Oct 26 '23 at 11:57
0

Windows (so far, as of Win7) does not have a system for natively handling the ISO format. You will need a third party utility.

Windows 8 will be adding the ability to natively mount existing ISO files, but I'm not sure if there will be a creation native utility.