Windows Tip Sheet

Backup on the Quick

Use command line to configure automated CD/DVD backup.

I recently had a posting on my Web site, ScriptingAnswers.com, asking how to script Windows' built-in CD burning capabilities (WinXP and Win2003). The fellow asking the question wanted to use CD-RWs as a quick backup solution on some of his servers, burning off a few key database files each night. Unfortunately, VBScript doesn't offer anything really compelling, but it isn't your only weapon for automating Windows administration tasks.

Burn from the Command Line
Go here and download CreateCD. This is a command-line utility that allows you to access the CD-burning features of Windows from a batch file. Build 1.25 is the latest version, and I've found it to be stable and extremely useful.

Basic burning is easy: Run Createcd –r:e file file file file. The –r option specifies the drive letter of the CD burner; in this case, it's E:. Add the –e option to erase a CD-RW before burning, and use –s:4 to slow things down to 4x burn speed (you'll need to use this if your media can't support your drive's max burn speed, which CreateCD will automatically use by default). Interestingly, I've had some success using CreateCD with writable DVD media, too, although not with every drive. I realize that not too many servers are shipped with DVD-R drives, but it's incredibly valuable for making automated backups on client computers that have them. With many laptop computers in the "power" range (e.g., Dell Inspiron, Toshiba Satellite) now shipping with DVD burners, this can be a great way to have an automatic backup while you're away from the office, without dropping another couple of hundred bucks for a 5GB PC Card hard drive, as a DVD holds almost as much data.

You can even use CreateCD to create bootable CDs, though it has been a real trial for me to get right. You'll need to provide a bootable floppy disk; CreateCD ships with a utility (FDRead) that will image the floppy. Just run CreateCD with the –i: option and specify the filename of the floppy image; tack on whatever other files you'd like to be burned to the CD and voila—it’s bootable.

CreateCD's author, Alex Feinman, has graciously made CreateCD available for free, although I encourage you to give him a small PayPal donation (he suggests $5) if you like the utility.

Micro Tips
Did you know that Win2003 disables its CD-burning features by default? Microsoft probably figured most servers don't come with a burner anyway, so why have the extra service running? But if you do want to use it, enabling it is easy. Just start the IMAPI CD-Burning COM Service, and you can have it start all the time by selecting the “Automatic” startup mode, otherwise choose “Manual” to enable it.

More Resources:
• I've been drooling over this Satellite notebook from Toshiba, with a built-in DVD multi-format burner: http://www.toshibadirect.com/td/b2c/cmod.to?seg=SMB&coid=-27931&sel=0&rcid=-26367&ccid=1291021.
• Alex Feinman also makes an ISO Recorder PowerToy for XP that burns ISO images using XP's built-in CD burning capability. Very cool and available at http://isorecorder.alexfeinman.com/isorecorder.htm.

About the Author

Don Jones is a multiple-year recipient of Microsoft’s MVP Award, and is Curriculum Director for IT Pro Content for video training company Pluralsight. Don is also a co-founder and President of PowerShell.org, a community dedicated to Microsoft’s Windows PowerShell technology. Don has more than two decades of experience in the IT industry, and specializes in the Microsoft business technology platform. He’s the author of more than 50 technology books, an accomplished IT journalist, and a sought-after speaker and instructor at conferences worldwide. Reach Don on Twitter at @concentratedDon, or on Facebook at Facebook.com/ConcentratedDon.

comments powered by Disqus
Most   Popular

Upcoming Training Events

0 AM
Live! 360 Orlando
November 17-22, 2024
TechMentor @ Microsoft HQ
August 11-15, 2025