Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build a CD ISO image file from the windows command line?

In an effort to satisfy "The Joel Test" question #2 "Can you make a build in one step?", I'm trying to complete a release candidate build script with the creation of a CD iso from the collection of files gathered and generated by the installer creator.

There seem to be many good tools (many free) out there that will create ISOs, but I need to find one that can be run at the windows command line so I can integrate it into the NAnt build script that's fired off by Cruise Control.

Build environment is:

  • Windows Server 2003
  • .NET 1.1 - 3.5 (application we're creating is built on 2.0)
  • NullSoft installer (NSIS)
  • CruiseControl.net
  • NAnt

I've been googling around, but no luck yet.

Anyone have a recommendation?

like image 296
Peter Avatar asked Oct 21 '08 20:10

Peter


People also ask

Can I create an ISO from a CD?

An ISO file is a complete disc image of a CD or DVD bundled into a single file. You can mount an ISO file to make it available as a virtual CD or DVD, allowing you to convert physical discs to virtual ones.

How do I make a CD using Windows Terminal?

In the command prompt window, type cd followed by the folder's name you wish to find. This only works for immediate folders straight after the one you're in. If you want to go back one directory, type cd .. to go up a level before typing cd to go back to the original option.

How do I create an ISO from a Windows installation?

In the tool, select Create installation media (USB flash drive, DVD, or ISO) for another PC > Next. Select the language, architecture, and edition of Windows, you need and select Next. Select ISO file > Next, and the tool will create your ISO file for you.


2 Answers

Try mkisofs. It's part of the cdrecord project.

like image 112
Andrew Avatar answered Sep 17 '22 01:09

Andrew


Creating a simple CD ISO

I've found a significantly easier approach, and it doesn't require Cygwin: CDBurnerXP

It's not really advertised on the site, but it includes a command-line edition, as cdbxpcmd.exe. There is also some documentation about the command-line options.

Of particular interest are the -iso and -format options; used something like:

cdbxpcmd --burn-data -folder:input -iso:output.iso -format:iso -changefiledates 

to generate an ISO called output.iso from the files in the input folder


Creating a Bootable ISO

The command line tool doesn't appear to let you make a bootable CD directly. However, if you know your list of files isn't going to change (ie only the content of those files), you could try the following (untested):

  • Load up the CDBurnerXP GUI version
  • Add the files interactively
  • Select Disc->Burn Options...
  • Set up your boot image
  • Select File->Save to create a DXP file (which is CDBurnerXP's compilation format)

Then, you can use the following command

cdbxpcmd --burn-data -layout:mycompilation.dxp -iso:output.iso -format:iso 
like image 33
kibibu Avatar answered Sep 19 '22 01:09

kibibu