Lparameters lpcFolder2Write If Empty(lpcFolder2Write) lpcFolder2Write="C:\0_Write2CD" Endif Local ; loDiskMaster As IMAPI2.MsftDiscMaster2, ; loRecoder As IMAPI2.MsftDiscRecorder2, ; loFSI As IMAPI2FS.MsftFileSystemImage, ; loDiscDir As IMAPI2FS.FsiDirectoryItem, ; loDiscWriter As IMAPI2.MsftDiscFormat2Data, ; lcRecorderID, loResult, loStream loDiscMaster=Createobject("IMAPI2.MsftDiscMaster2") lcRecorderID=loDiscMaster.Item(0) loRecorder=Createobject("IMAPI2.MsftDiscRecorder2") loRecorder.InitializeDiscRecorder(lcRecorderID) *!* loRecorder.EjectMedia() *!* lnUserReply=Messagebox("Insert blank CD media!",1+48,"Warning") *!* If lnUserReply=2 *!* Return *!* Endif *!* loRecorder.CloseTray() *Here checks for media *? loDiscWriter.MediaPhysicallyBlank loFSI=Createobject("IMAPI2FS.MsftFileSystemImage") loDiscDir=loFSI.Root loDiscWriter=Createobject("IMAPI2.MsftDiscFormat2Data") loDiscWriter.Recorder=loRecorder ? "Current Physical Media Type is: " ?? loDiscWriter.CurrentPhysicalMediaType loDiscWriter.ClientName="Microsoft Visual FoxPro" loFSI.FreeMediaBlocks=loDiscWriter.FreeSectorsOnMedia loFSI.FileSystemsToCreate= 1 && FsiFileSystemISO9660 loDiscDir.AddTree(lpcFolder2Write,.T.) loResult=loFSI.CreateResultImage loStream=loResult.ImageStream Wait "Writing content to CD..." Windows Nowait loDiscWriter.Write(loStream) && error probably because loStream not formed Wait "Finished!">What are the issues when VFP needs to write to a CD?