Re: Vista - Burn to Cd
- From: "Alex K. Angelopoulos" <aka(at)mvps.org>
- Date: Thu, 9 Apr 2009 13:07:22 -0400
I don't have a Vista system handy to check this against, but it seems likely that the issue is getting the menu choice or activating the window. So check the following:
(1) If you right-click the CD burn folder in Vista, do you get a menu choice that looks _exactly_ like "Write these files to CD" with the "t" in "these" underlined?
(2) If that looks the way it should, then if you try to interactively write the files to CD, is the window that pops up prompting for volume label still titled "CD Burning Wizard" under Vista?
I suspect the issue is (1), at least the choice of which item shows up as underlined. If not, there's another issue I've seen where InvokeVerbEx doesn't seem to work. If that's the case, you need to step through the verbs collection and invoke the DoIt() method against the proper verb. Replace the following code:
objShell.NameSpace(&H11&).ParseName(strDriveLetter).InvokeVerbEx( _
"Write &these files to CD")
with this:
set drv = objShell.NameSpace(&H11&).ParseName(strDriveLetter)
for each verb in drb.Verbs()
if verb.Name = "Write &these files to CD" then
verb.DoIt()
end if
next
"Oli M" <OliM@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:9218357A-17D9-4EFF-B178-488F20F79FEB@xxxxxxxxxxxxxxxx
Here is the script. it works fine on XP but not on vista as i said, it copies.
all of the files over and has the prompt "there are files ready to be written
to cd".
In xp it automatically burns the files to cd
Re that link you posted I have tried that but it didnt help
I dont want any third partysoftware installed i Just want a script that i
can run that copies files over from a specified folder and writes them to cd
' Provide the drive letter of your CD burner
strDriveLetter = "F:\"
' Provide the source directory
strSourceDirectory = "C:\Sheepdip"
' Provide a volume name for your CD (16 characters max)
strCDName = "SheepDip"
Const MY_COMPUTER = &H11
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objShell = CreateObject("Shell.Application")
strBurnDirectory = WshShell.RegRead( _
"HKCU\Software\Microsoft\Windows\CurrentVersion\" _
& "Explorer\Shell Folders\CD Burning")
Set objFolder = objShell.Namespace(strSourceDirectory)
objShell.Namespace(strBurnDirectory).CopyHere objFolder.Items
objShell.NameSpace(&H11&).ParseName(strDriveLetter).InvokeVerbEx( _
"Write &these files to CD")
Do Until WshShell.AppActivate("CD Writing Wizard")
WScript.Sleep 200
Loop
WshShell.AppActivate("CD Writing Wizard")
WshShell.SendKeys strCDName
WshShell.AppActivate("CD Writing Wizard")
WshShell.SendKeys "{Enter}"
Do Until Not WshShell.AppActivate("CD Writing Wizard")
WScript.Sleep 200
Loop
- References:
- Vista - Burn to Cd
- From: Oli M
- Re: Vista - Burn to Cd
- From: Alex K. Angelopoulos
- Re: Vista - Burn to Cd
- From: Oli M
- Vista - Burn to Cd
- Prev by Date: Re: This Is Not The Problem You're Looking For
- Next by Date: Re: Create a path string
- Previous by thread: Re: Vista - Burn to Cd
- Next by thread: LDAP Group Query Results Limitation
- Index(es):
Relevant Pages
|