Re: Vista - Burn to Cd



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

.



Relevant Pages

  • Re: Writing reserved sectors in Vista
    ... The question is about "raw" writing a specific sector in a disk image file ... "access is denied" in Windows Vista. ... Microsoft Online Community Support ...
    (microsoft.public.win32.programmer.kernel)
  • Re: User Profile Issue
    ... First of all do you have the Vista compatibility patch installed on SBS? ... Also you say that it won't allow you to run the wizard? ... I have recreated a new user profile and that wont allow me to run the ... connect computer wizard either. ...
    (microsoft.public.windows.server.sbs)
  • Re: create link to a specific section on different page in Publish
    ... I even tried writing a link to my own coputer - no luck! ... it's like Vista: I'm waitng until SP1 comes out before I bite. ... The Kat ... "DavidF" wrote: ...
    (microsoft.public.publisher.webdesign)
  • Re: Writing File to CD ROM
    ... One way, using the shell invokeverbex method, and SendKeys to provide input ... to WXP's CD writing wizard, ... The script below has lots of message boxes to allow you to see what is ... Do Until WshShell.AppActivate("CD Writing Wizard") ...
    (microsoft.public.scripting.vbscript)
  • Re: Writing File to CD ROM
    ... input to WXP's CD writing wizard, ... The script below has lots of message boxes to allow you to see what is ... Set objShell = CreateObject ... Do Until WshShell.AppActivate("CD Writing Wizard") ...
    (microsoft.public.scripting.vbscript)