additional functionality needed using IMAPI2 (burning CD/DVD)

Hello,

I have found some VBS code that uses IMAPI2 to write data on CD/DVD.

This works well, but I would need to add  additional functionality such as :

-write speed  (for example : determine max. possible speed, set write speed)
-error checking (for example : detect "no disk inserted"...)
-device and media compatibility

How could I add such things ?
All what I have found so far are links to
http://msdn.microsoft.com/en-us/library/aa366224.aspx
but there is no sample code for VBS (at least, I haven't found some)

Here is the code that I have:
(http://www.aspfree.com/c/a/Windows-Scripting/Burning-CDs-with-the-IMAPI2-Control)

intIndex = 0
strPath = "C:\BurnTemp"
Set objDiscMaster = WScript.CreateObject("IMAPI2.MsftDiscMaster2")


Set objRecorder = WScript.CreateObject("IMAPI2.MsftDiscRecorder2")
strDevice = objDiscMaster.Item(intIndex)
objRecorder.InitializeDiscRecorder(strDevice)



Set objImageWriter = CreateObject("IMAPI2.MsftDiscFormat2Data")
objImageWriter.Recorder = objRecorder
objImageWriter.ClientName = "IMAPI Script"


Set objFSI = CreateObject("IMAPI2FS.MsftFileSystemImage")
objFSI.ChooseImageDefaults(objRecorder)


objFSI.FileSystemsToCreate = 1


Set objDir = objFSI.Root
objDir.AddTree strPath, False


Set objImage = objFSI.CreateResultImage()
Stream = objImage.ImageStream

wscript.echo "start writing:"

'control will not return to the script until the burn process has completed.
objImageWriter.Write(Stream)



thank you
Heinz







0
Heinz
4/27/2010 10:41:49 AM
scripting.vbscript 564 articles. 0 followers. Follow

0 Replies
1903 Views

Similar Articles

[PageSpeed] 19

Reply:

Similar Artilces:

*major* functional issue with MOSS/WSS?
We are looking to move a big site over to using MOSS in a big as an alternative to shared network drives (ugh). One of the biggest issues is sending docs as attachments via email for others to edit. We'd like to get everyone to use the 'send a link' functionality from thew Sharepoint DL BUT when the user receives the email and clinks on the embedded link the doc opens read only. They then cant edit and save their changes. Seems a big an counter intuitive functional flaw. Are we missing something here? Is there any easy (for the end user) way to send those links to a doc ...

Can SUMPRODUCT be used for entire column?
This formula results in a numeric result: =SUMPRODUCT((A1:A20)*(B1:B20="b")) but this formula results in a #NUM! result: =SUMPRODUCT((A:A)*(B:B="b")) Which means I need to specify the length of the columns, which may grow over time. Any way to do this for the entire column, without having to specify the length of the column? XL07 removed the limitation on array formulas (which SUMPRODUCT is, even though it doesn't require CTRL-SHIFT-ENTER) and entire columns. For pre-XL07, one can use =SUMPRODUCT(A1:A65535, --(B1:B65536="b")) to get all but on...

crm consultant needed asap
i am looking for a crm consultant who has a lot of experience with form customization, crm implimentation, heavy work flow, and activities. ideally someone in arizona but not required. telecommute will be considered for the right person. looking for someone for a possible 2 month (i am guessing here....) project. if you are available and have this experience please email me at j-e-f-f@mag-en-ta-tech.c-o-m (remove the -). we are looking for someone to start like next week at the latest (this message was posted 08-08-2004). This message was posted 8/4, not 8/8. And I have some swamp land in f...

Using scanner in Word97
I want to scan a picture into word97 using my HP 4370 ScanJet. Could not find option of "From Scanner" under "Insert" --> "Picture". Apparently I must need some sort of Word97 Add-On. What and where is the add-on? Is it on the Office97 CD? Same applys to Excel97. Also, does microsoft sponsor a Word97 / Office97 discussion group? If so, would appreciate a link. "PSRumbagh" <PSRumbagh@discussions.microsoft.com> said this in news item news:39100DC1-A7EE-4679-881D-526BAA386620@microsoft.com... > I want to scan a picture ...

Using later version of microsoft access
Hi, I've got access 2000 on my computer. When I go to open a database someone sent me I get an error message : this database is in an unrecognized format. The database may have been created with a later version of microsoft access. Is there any way I can open and use this file (short of upgrading to later version of access)? If you do not have Access 2002 or 2003, ask the person to save it in Access 2000 format for you. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at m...

VCR to DVD Part 2
Many thanks for previous answers. Yes, finalizing the DVD worked I found that DVD-R need finalizing but DVD+RW disks do not But why was I able to play the unfinalized DVD-R on one machine and not on two others. What was special about the first PC? -- www.stfx.ca/people/bliengme Bernard Liengme wrote: > Yes, finalizing the DVD worked > I found that DVD-R need finalizing but DVD+RW disks do not > But why was I able to play the unfinalized DVD-R on one machine and not on > two others. > What was special about the first PC? Almost anything will play a finalised D...

Problem with Update function of CRecordSet class
Hi All When I use from Update function of CRecordSet class, it apply to table after a few time(for example 1 second) when I need to see it at time. Thanks ...

Using Company Wide Mail Templates.
Hi, I do not know if i am at the right spot here, or if it is evne possible, but i got the following question. My boss would like me to make sure that every outgoing mail has the same looks. It starts by adding a signature that is the same for everyone, except with ofcourse personalized information. This was easily done by giving everyone a signature. The next question is however, to put the head of our website, also above our mail. This means that every user that sends a mail, the mail will have a nice header, underneath that header, the mail is typed, and then its ended with the si...

Dynamic Range Selection Using VBA
What I'm trying to accomplish is to be able to run a procedure that selects a range based on a number provided in another cell. For example; if the number 10 is in cell A1, then cells A20:A30 would be selected when I run the macro. If the number 6 is provided, then cells A20:A26 would be selected. Not sure where to start, so any help is appreciated. this may do what you want range("A20").Resize(range("A1").Value+1).select -- Gary Keramidas Excel 2003 "TEK" <TEK@discussions.microsoft.com> wrote in message news:DA9FFF99-FC28-...

how create Quota filter in WIndows 2003 R2 using Script
Hi all I need create quota filter in Server 2003 R2 using vbscript. quota filter should be applied to directories and not by users. I searched information about it on google without success. thank's in advance Daniel Hi Daniel. First you need open your FSRM (File Server Resource Manager), then you create a quota template, you must specify if your quota is "software" (just monitoring, but never deny the user) or "hardaware" (deny users when they use 100% of the quota), you must specify if you want send e-mail to user when this user use...

Exchange server crashed, please help....! Need to restore two priv.edb and pub.edb files into one....!
Hi Guys, I was wondering if I could get some help with the following problem we are having on our company. Here is the scenario; Our Windows NT 4.0 SP4a server running Exchange 5.5 SP4 crashed (Server 1) due to the exchange database reaching its 16 Gig's max limit. I went ahead and moved some mailboxes' e-mails to a few .pst files in order to make some space. This worked ok. Then, I decided to build another exchange server (Server 2) to moved some mailboxes and alleviate the load. Once the server was ready and configured as part of the current exchange site, I went ahead and move...

date function #3
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C73005.0FA093A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have a cell A1 with date 5/2/07. If in cell A2 I do month(A1), I get = 5. Is there a way to return May instead? either through a command or = formatting? I can reference cell A2 with the 5 with a if(cell =3D 5, = "May", ) in cell A3, but the date in cell A1 varies from Jan to Dec and = the 12 embedded if's in cell A3 are too long (that is the error I get = when trying to do so), plus i...

Using Publisher 200 with Publisher 2003
How do I covert PUB2000 documents to Pub2003 documents and vice versa? Pub 2003 can open anything, no conversion necessary. Going backward is a bit trickier. File - Save As and chance the file type to a Pub 2000 file. Possible problems can arise if you've used a feature that was not available in the 2000 version and your file size will grew immensely. -- JoAnn Paules MVP Microsoft [Publisher] "nasuco" <nasuco@discussions.microsoft.com> wrote in message news:500C7A7A-4026-434C-8CC2-2DFDB69D81C4@microsoft.com... > How do I covert PUB2000 documents to Pub2003 do...

Removing text from cells leaving numbers (help with function)
I need a function that will remove all text from a cell and just leav numbers. Formatting cells to number does not work. For example if I have: (Sired] Tennessee 37013 (herein I just want 37013 left. Anybody know a function to resolve this -- Message posted from http://www.ExcelForum.com The following will strip the text from the active cell and place the number in the adjcent cell one column to the left. If there are subsequent numbers in the original string you will get erroneous results. Put the cursor on the cell to be processed and run the macro. ********************************...

burned cd doesn't play
Hi, I'm running Windows Media Player version 11 on Vista Home Premium. I'm trying to copy a cd which contains voice recordings, not music. I ripped it fine as MP3 format and I'm trying to burn it with the option Audio CD. It burns, seems to work fine, doesn't give any error message but when I put the burned cd back in the computer it pops up the message asking what you want to do with this blank cd. So, it doesn't actually burn it. What could be going wrong? ...

I really need help with a formview problem
I have a formview that I place a toolbar onto. In my OnInitialUpdate(), after I create the toolbar, I say GetParentFrame()->RecalcLayout(); ResizeParentToFit(FALSE); ResizeParentToFit(TRUE); The formview is still not sized properly. It looks like the problem is the toolbar on the top of the formview. It is not being taken into account in sizing the formview. The difference at the bottom of the form that is not displayed is the size of the toolbar. Any suggestions? Should work if your toolbar was created (and docked) back in your CMainFrame::OnCreate() method. ----- William Gower ...

Can not open additional mailboxes in my mailbox after a exchange 2003 rebuild database
To Exchange 2003 Gurus I have a exchange server that serve a lot of users. 3 week ago I had to repair the database with great success. But now I noticed a problem that in the past I was able to acomplished I can not open additional mailboxes in my mailbox.(right click on my mailbox>properties>advanced>Advanced tab> and when I click on add I get THE NAME COULD NOT BE RESOLVE. THE ACTION COULD NOT BE COMPLETED. This message appear eventhough I did not type anything Here is more info -I am able to open additional mailboxes if I use a computer with my profile that I created before I r...

problem opening up program/file
Hello, All. I am having some trouble opening up Word. It was working okay until I loaded some fonts to FontBook. Okay, now I removed all my fonts but I still get this error message about corrupt fonts I have on my computer. When I open Word, I see the blue starting-up window: Word:Mac 2004. Right underneath the product ID #, I see that it is initiating... when it gets to the point "Optimizing font menu performance" I start getting this error windows popping up one after another. (E.g. The font M TimesSmallText is corrupt and should be removed.) I keep on clicking okay for a whole lot...

VC++ .NET 2002: error C2509: 'OnPrepareDC' : member function not declared in 'CEg06aView'
Hi all I am learning the OnPrepareDC Function and ShowFont Helper Function from the Ex06a example of the book 'Programming With Microsoft Visual C++ .NET Core Reference' by G. Shepherd with D. Kruglinski. I started my new MFC Project 'Eg06a' from the MFC Wizard and added/edited the OnPrepareDC Function and ShowFont Helper Function in the Eg06aView.cpp and Eg06aView.h files - see the attached files below. When I did 'Build' on my project 'Eg06a', I got the following error: c:\Documents and Settings\Scott H. Chang\My Documents\Visual Studio Projects\Eg06a\Eg06aVi...

How to use different return email addresses
I use outlook 98. I have a mailbox with three aliases. People sending me emails can use any of the three email aliases and the email will arrive in the same mailbox. Accessing the mailbox once will retrieve all messages regardless of which alias was used. If I reply to these emails though, I want the recipient to think that the email has come from the alias that they originally used. What outlook always seems to do is use the email address of the service that is listed first in Tools->Services->Delivery. Is there any way Outlook can be set up so when I reply to a given email, my email ...

Translating Formulas to Functions
I'm hoping someone here can set me on the right path via an example so that I can complete this onerous task. Currently I have a spreadsheet for fantasy football that I maintain. The Workbook (Excel 2003) has the following worksheets Sheet 1 = Named Totals Sheets 2 - 18 = Named Week1, Week2, Week3, etc to Week17 Sheet19 = Status Sheet 20 = Roster Roster has 5 columns, 1 for each player position (QB, RB, WR, K, Def) Under each column is listed the person or team for that slot. Status has 18 columns and 44 rows. Some rows are blank or just contain a description. Column 1...

SAVE function
Can you put a date on the sheet and only have it change automatically if the file is saved? if so please indicate exactly how. thanks Hi use the following UDF (only on workbook level): Function DocProps(prop As String) application.volatile On Error GoTo err_value DocProps = ActiveWorkbook.BuiltinDocumentProperties _ (prop) Exit Function err_value: DocProps = CVErr(xlErrValue) End Function and enter in a cell =DOCPROPS("last save time") (format cell as date) for more about UDFs see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kab...

Trouble with the Favorites function
My favorites function worked till yesterday. When I click the Favorites in this bar: File Edit Favorites Tools Help, I still get a list of all my Favorite folders, but when I put the mouse pointer over a folder, all I get is a blank mini-window. For example, when I place my mouse pointer over the Medical folder, I used to get the half dozen sites I placed in this folder. Now I get only a blank space. The Favorites function works sometimes though - about 10% of the time. Then it goes out and I get that blank mini-window after I click on the folder. There's probably an ...

Save as CSV isn't saving comma delimited, but is using semi-colon.
Save as CSV isn't saving comma delimited, but is using semi-colon... How do I get it to save using commas only (,)? (I'm using semicolons for other delimitations and so can't just do a global replace.) Thanks so much for your help! Hi Excel uses your Windows regional settings for saving CSV files. Also ho should an importing program of this CSV file know whether it is the list separator or one of your other separators? -- Regards Frank Kabel Frankfurt, Germany CCinItly wrote: > Save as CSV isn't saving comma delimited, but is using semi-colon... > How do I get it ...

easy to use templates
Hi We have outlook templates that people fill in each morning and send to a distribution list. But they are not that easy to fill out as you have to place the curser in the proper spot to type then do that throughout the entire document. It is easy to overlook items. Is there a way to set up a template that you can just hit tab or enter and it automatically goes to the next area that you need to type information? -- Thank-you! Ruth What exactly are you using now? In other words, what do you mean by "templates"? Also, do you meet the prerequisites for using...