Thanks to everyone who participated in the Optical Beta chat today!
I'm trying to get a better, full-feature sample that we can put up on the forums, but for now here is a sample derived from our WinHEC slides that burn an ISO image to a disc. The only missing piece is creating a stream over the ISO file. I cannot get a piece of code that I can release for this in VBScript yet, although a good start is SHCreateStreamOnFile for C++ development. Even though it does not work without this one function, this sample still shows the necessary steps to burn an ISO image. Although this is officially unsupported code, I'd be glad to answer any questions about the IMAPIv2 functionality it exhibits...
' Recorder index and ISO path
recorderIndex = 0
isoPath = "c:\Sample.iso"
' Create and initialize IDiscRecorder2 from IDiscMaster
SET g_DiscMaster = WScript.CreateObject("IMAPI2.MsftDiscMaster2")
SET recorder = WScript.CreateObject("IMAPI2.MsftDiscRecorder2")
uniqueID = g_DiscMaster.Item(recorderIndex)
' Create a stream filled with the ISO file contents
SET stream = fnCreateStreamFromFile(isoPath)
' Create IDiscFormat2Data and attach to IDiscRecorder2
SET dataWriter = WScript.CreateObject("IMAPI2.MsftDiscFormat2Data")
dataWriter.recorder = recorder
dataWriter.ClientName = "VB ISO Burner"
' Check if disc is blank and burn (or exit)
IF (dataWriter.MediaHeuristicallyBlank) THEN
WScript.Echo "Burn complete!"
WScript.Echo "[ERROR] please insert blank media!"
edit: updated blank check to use proper function