CD Writer
The CD Writer is a simple COM object that can be used safely in script to write directly to a data CD. It uses an API provided in Windows XP (and later) called IMAPI, but greatly simplified to provide ease of use in a scripting environment. Known supported formats are CDR, CD/RW and DVD.The object also supports the ability to generate PKZIP compatible zip files and add them to the CD image.
Note: This is not an ActiveX control. You cannot 'add' it to VB's toolbox. Instead you must add a reference.
Setup
This download is free of charge and is limited to personal, non-profit use only.
Option 1. Use the supplied setup program.
- download setup_ksCDWriterAR.exe (207Kb)
- included is a super simple script that might help you get up and running.
- Read the documentation.
Option 2. Download and Self-Register the DLL.
- download ksCDWriterAR.zip (ANSI Release version) (91Kb)
- register it using regsvr32. (eg c:\windows\regsvr32.exe c:\downloads\ksCDWriterAR.dll)
- Read the documentation.
Sample Script
The following is a demonstration vbs script (actually it is my own personal backup script):
'
' init the CD burning
dim cdr
set cdr = CreateObject("ksCDWriter.CDBackup")function DoBackup(FileList, Dest, options)
' generate zip files in d:\backup\ which will be deleted afterwards
call cdr.AddCompressedFile( "d:\backup\" & Dest, FileList, options )
end functioncall DoBackup("d:\devtools\*.*", "devtools.zip", "")
call DoBackup("d:\download\*.*", "download.zip", "-xnew\*.*")
call DoBackup("d:\SourceSafe\*.*", "SourceSafe.zip", "")
call DoBackup("d:\source\*.*", "source.zip", "-x*.obj -x*.pch -x*.log -x*.tmp -x*.idb -x*.ncb -x*.sbr -x*.bsc -x*.ilk -x*.pdb -x*.exp -x*.mak -xStockManager\Build\*.*")
call DoBackup("C:\Documents and Settings\Craig\Desktop\*.*", "Desktop.zip", "")
call DoBackup("d:\My Documents\*.*", "MyDocuments.zip", "")
call DoBackup("C:\Documents and Settings\Craig\Local Settings\Application Data\Identities\{989D01C4-BCAF-43F2-8A02-A92259EE342A}\Microsoft\Outlook Express\*.*", "OutlookExpress.zip", "")'
' Burn It!
on error resume next
call cdr.BurnDisc()
Screenshots