NeroCOM/VB6 problems Root+Sub Dirs(data only)

vbimport

#1

I am making an application that will burn a few files to a dvd and requires the UDF file system – I have been having multiple issues:

Issue one: Using the first set of code below, I can get ALL needed data burned however I am unable to set the cd label (what it shows up as in my computer) and it will NOT autoplay (autoplay is a required feature of this application)

Issue two: Using the last code snippet below, I can get Autorun + the cd label working, but I am UNABLE to add a subfolder (I can create it, however unable to add files to it)

I need serious help, I am about 5 dvd/cd’s away from being able to wholesale coasters.


-----------------------------------------------------------------
Private Sub Burn_click()
pb.Visible = True

Dim myFolder As Folder
Dim myRootNeroFolder As NeroFolder

' create the iso root folder first
Set myRootNeroFolder = New NeroFolder
'myRootNeroFolder.Name = CStr(Left(fl.Filename, Len(fl.Filename) - 4)) ' "SomeName"
myRootNeroFolder.Name = "Test"


' use ms filesystem to get the folder you want to add to the cd
'Set myFolder = fs.GetFolder(App.Path & "\dist\sp1")

' add it to the root folder using the recursive "add_folder_files()" function (defined below)
'myRootNeroFolder.Folders.Add add_folder_files(myFolder)
GoTo abortroot
Set myFolder = fs.GetFolder(App.Path & "\dist")

Set myFoldera = fs.GetFolder(App.Path & "\dist")
Dim myfilea As file
Dim myfilesa As Files
Set myfilesa = myFoldera.Files

For Each myfilea In myfilesa
Set mynerofilea = New NeroFile
mynerofilea.Name = myfilea.Name
mynerofilea.SourceFilePath = myfilea.Path
myRootNeroFolder.Files.Add mynerofilea
Next


Set myFolder = fs.GetFolder(App.Path & "\dist\sp1")
myRootNeroFolder.Folders.Add add_folder_files(myFolder)



' set up the isotrack
Set myneroisotrack = New NeroISOTrack
myneroisotrack.Name = CStr(Left(fl.Filename, Len(fl.Filename) - 4))
myneroisotrack.RootFolder = myRootNeroFolder
myneroisotrack.BurnOptions = NERO_BURN_OPTION_CREATE_UDF_FS + NERO_BURN_OPTION_USE_JOLIET

Set drive = drives(AvailableDevices.ListIndex)

' burn the disc

drive.BurnIsoAudioCD "aaaa", "bbbb", 0, myneroisotrack, Nothing, Nothing, NERO_BURN_FLAG_WRITE, 0, NERO_MEDIA_CD
end sub
-----------------------------------------------------------------


-----------------------------------------------------------------
Private Sub burn_Click()
pb.Visible = True

    burn.Enabled = False
    
    

    Set Folder = New NeroFolder
    Dim drives As INeroDrives
    Set drives = nero.GetDrives(NERO_MEDIA_DVD_ANY)
    Set drive = drives(AvailableDevices.ListIndex)
    
       
    Dim file As NeroFile
    
    

    Set dvdfs = New NeroFileSystemDescContainer
    Dim isotrack As NeroDirectoryContainer
    Set isotrack = dvdfs.RootDirectoryContainer
    
    dvdfs.Name2 = Left(fl.Filename, Len(fl.Filename) - 4)

    cnt = 0
maxcnt = 16
Do
Set file = New NeroFile
If cnt = 0 Then slist = fl.Filename
If cnt = 0 Then sPath = Replace(fl.Path & "\", "\\", "\")
If cnt <> 0 Then sPath = Replace(App.Path & "\", "\\", "\")
If cnt = 1 Then slist = "deploy.vpc"
If cnt = 2 Then slist = "autorun.inf"
If cnt = 3 Then slist = "autorun.ico"
If cnt = 4 Then slist = "a16_tmrs.ocx"
If cnt = 5 Then slist = "mbprgbar.ocx"
If cnt = 6 Then slist = "installer.exe"
If cnt = 7 Then slist = "comctl32.ocx"

If cnt > 7 Then sPath = Replace(App.Path & "\", "\\", "\")
If cnt = 8 Then isotrack.AddDirectory "sp1", -1
If cnt = 8 Then slist = "1031.mst"
If cnt = 9 Then slist = "1034.mst"
If cnt = 10 Then slist = "1036.mst"
If cnt = 11 Then slist = "1040.mst"
If cnt = 12 Then slist = "1041.mst"
If cnt = 13 Then slist = "autorun.inf"
If cnt = 14 Then slist = "Microsoft Virtual PC 2004.msi"
If cnt = 15 Then slist = "setup.exe"
cnt = cnt + 1
file.Name = slist
file.SourceFilePath = sPath & slist
If cnt <= 7 Then isotrack.AddFile2 slist, sPath & slist, -1, -1
If cnt >= 8 Then isotrack.SubDirectory("sp1").AddFile2 slist, sPath & slist, -1, -1  *****PROBLEM LINE******
Loop Until cnt = maxcnt


    dvdfs.BurnOptions = NERO_BURN_OPTION_CREATE_UDF_FS + NERO_BURN_OPTION_USE_JOLIET
    
        drive.BurnFileSystemContent dvdfs, NERO_BURN_FLAG_WRITE, 8, NERO_MEDIA_DVD_ANY
End Sub
-----------------------------------------------------------------