Windows Scripting
  Home arrow Windows Scripting arrow Page 4 - Burning Multisession CDs with IMAPI2 in WS...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Burning Multisession CDs with IMAPI2 in WSH
By: Nilpo
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-11-10

    Table of Contents:
  • Burning Multisession CDs with IMAPI2 in WSH
  • Getting started
  • Building the burn image
  • Adding files and burning the image
  • Final thoughts

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Burning Multisession CDs with IMAPI2 in WSH - Adding files and burning the image


    (Page 4 of 5 )

    At this point in our script, we have a session image to begin adding files to.  This image will contain any existing data on the disc.  Next, we'll add any files that we wish to burn, just as we did for single session discs.

    WScript.Echo "Adding " & strPath & " directory to the disc..."

    objFSI.Root.AddTree strPath, False

    The AddTree method is used to add a directory structure and its contents to the existing disc image.  The first parameter is a string value indicating a path to a directory containing files to burn.  The second parameter is a Boolean value that indicates whether the parent folder should be included in the image or should only add its child objects.

    Set objImage = objFSI.CreateResultImage()

    Stream = objImage.ImageStream

    Once all of the files have been added to the image, the CreateResultImage method is used to create the actual session image.  This is similar to saving an ISO image of a CD.  You must then create an IStream object to stream that image to the recording device.

    objImageWriter.Write(Stream)

    Once you have a valid image stream, the write process is started with a single call to the ImageWriter object's Write method.  You must provide the data stream to be written as a parameter.

    More Windows Scripting Articles
    More By Nilpo


     

    WINDOWS SCRIPTING ARTICLES

    - More Windows Scripting Workarounds from Nilpo
    - Overloading Methods and More in VBScript
    - Improving MFC for Windows Vista
    - Regular Expressions in VBScript
    - Working with Dates in WMI
    - Completing Calendars with VBScript Date Func...
    - Building Calendars with VBScript Date Functi...
    - Working With Dates and Times in VBScript
    - Designing WCF DataContract Classes Using the...
    - Understanding Dates and Times in VBScript
    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT