Writing a .ISO with Nerocom

vbimport

#1

Please correct me on this.
I’ve got Nerocom working a treat.
BUT, (And theres got to be one), I do have a need to
be able to burn a .ISO image. Does Nerocom support this?
Otherwise I’ll have to extract the .ISO before passing it to the
writing software I’ve written.

Thanks in advance.
Terry


#2

Oh, these ISO’s are normal CD ISO being written to CD.


#3

You can create a NRG image by burning on an Image Recorder.


#4

Thanks for your reply.

You misunderstand me.
I have a .ISO already created.
I’m wanting to use NeroCOM to try to write the ISO to a CD.
(Like using file open in Nero and selecting the .ISO
Then just writing it).


#5

Yes, obviously :wink:

It is as easy as using BurnImage of NeroDrive. Pass it a file path, flags and speed.


#6

:eek: :bow:
DAMN.
Too easy, Never even saw it.
My humble apologies for my blindness.

:bow: :bow: :bow: :bow:


#7

OK, Now I’m stumped.

Using this I can burn any file/s easily.
Set file = New NeroFile
Set isotrack = New NeroISOTrack
Set Folder = New NeroFolder
DoEvents
isotrack.Name = “EDS”
isotrack.RootFolder = Folder
file.Name = NameFromPath(strFileName)
file.SourceFilePath = strFileName
Folder.Files.Add file
isotrack.BurnOptions = NERO_BURN_OPTION_CREATE_ISO_FS + NERO_BURN_OPTION_USE_JOLIET

drive.BurnIsoAudioCD "", "", 0, isotrack, Nothing, Nothing, _
    NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_DISABLE_EJECT + NERO_BURN_FLAG_DETECT_NON_EMPTY_CDRW, _
    drive.WriteSpeeds(drive.WriteSpeeds.Count - 1), NERO_MEDIA_CD

However using
drive.BurnImage strFileName, NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_DISABLE_EJECT + NERO_BURN_FLAG_DETECT_NON_EMPTY_CDRW, _
drive.WriteSpeeds(drive.WriteSpeeds.Count - 1)
to burn my .ISO image is getting an initalisation error.

Anyone have an example of the code to achieve this?


#8

You can use 0 for maximum speed.

Can you please post your error log?


#9

18-03-2004 10:21:32 Write_CDR 1.0 Started
18-03-2004 10:21:33 Writing CD for Atlantis CD
18-03-2004 10:21:33 File name : d:\atlantis.iso
18-03-2004 10:21:33 Drive : IOMEGA CDRW9602EXT-B
18-03-2004 10:22:06 Initialization failed

The initialisation failed is from the nero.LastError

The code is pretty basic.

Set nero = New nero
Dim strFileName As String
Dim strFileDescription As String
Set drives = nero.GetDrives(NERO_MEDIA_CDR)
For intmyindex = 0 To drives.Count - 1
rem === Rotate through the drives and find the writer ===
    If drives(intmyindex).DevType = NERO_SCSI_DEVTYPE_WORM And _
        InStr(LCase$(drives(intmyindex).DeviceName), "image recorder") = 0 Then
        Set drive = drives(intmyindex)
    End If
Next
strFileName = Left$(Command$, InStr(Command$, ",") - 1)
strFileDescription = Right$(Command$, Len(Command$) - InStr(Command$, ","))
Write_log "Writing CD for " & strFileDescription
Write_log "File name : " & strFileName
Write_log "Drive : " & drive.DeviceName
DoEvents
drive.BurnImage strFileName, NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_DISABLE_EJECT + NERO_BURN_FLAG_DETECT_NON_EMPTY_CDRW, 0

It’s the BurnImage that causes the error.


#10

Ok.
Sorted.

Thanks for the help.


#11

What was the problem (in case someone else has a similar issue)?


#12

The filename I was passing of the image was incorrect.
(Yes I know, I know, I wasn’t checking the file existed before trying to write it, but it’s a totally automated process that only fires on the creation of an ISO, BUT thats NOW fixed and trapped.)

So the initalisation failed with writing an ISO image
in my case was just caused by a lower case L instead of an I.
(Yes, changing strfilename to upper case when parsing the command line helped me find it)

1/2 a day for something so stupid.

:a :a
Mutter, mutter, mumble.

Thanks all for the help.