Windows Scripting
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationWindows Scripting

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 23rd, 2008, 10:22 PM
wjarrett's Avatar
wjarrett wjarrett is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Idaho
Posts: 97 wjarrett User rank is Sergeant (500 - 2000 Reputation Level)wjarrett User rank is Sergeant (500 - 2000 Reputation Level)wjarrett User rank is Sergeant (500 - 2000 Reputation Level)wjarrett User rank is Sergeant (500 - 2000 Reputation Level)wjarrett User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 6 h 52 m 22 sec
Reputation Power: 24
Adding files to cd burn list using vbscript

Ok,

I can make my cd tray open automatically.
I can prompt users to feed the tray with a fresh cd.
I can make them click ok when done so the cd tray closes.

Question, Can I pass parameter values to the CD Burn list &
can I make the CD burner automatically burn the CD?

I am dealing with known file names and paths on a network so I am assuming this can't be too hard... right?

I am sure the answer is out there in a previous post but so far 5 hours plus searching the internet has done little more than to further confuse me.

I am not having much luck finding what I am looking for.

Anyone have a sample code I can work with ?



The sample code attached, I found earlier and works. I believe I might be able to modify with a little guidance



Ok the latest I have found is this CDBurn command which is getting me a little closer but not quite. I want to copy the raw files in a folder as they are without being changed in any way.

There has to be a way to do this......Right?
Attached Files
File Type: doc openclosecd.txt.doc (25.5 KB, 164 views)
File Type: txt CdburnCommand.txt (77 Bytes, 133 views)

Last edited by wjarrett : June 24th, 2008 at 01:28 AM. Reason: upload attachment

Reply With Quote
  #2  
Old June 24th, 2008, 02:41 AM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Beginner (1000 - 1499 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,253 Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Days 10 h 3 m 7 sec
Reputation Power: 667
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
If you burn using the Windows API (via the Roxio plugin), all you have to do is shell copy the files to the device drive. Windows will automatically add them to a temporary location. It's the equivalent of right-clicking a file and choosing your CD/RW device from the Send To menu.
__________________
Click the image if at any point you don't like my decision.

Scripting problems? Windows questions? Ask the Windows Guru!


Reply With Quote
  #3  
Old June 24th, 2008, 09:39 AM
wjarrett's Avatar
wjarrett wjarrett is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Idaho
Posts: 97 wjarrett User rank is Sergeant (500 - 2000 Reputation Level)wjarrett User rank is Sergeant (500 - 2000 Reputation Level)wjarrett User rank is Sergeant (500 - 2000 Reputation Level)wjarrett User rank is Sergeant (500 - 2000 Reputation Level)wjarrett User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 6 h 52 m 22 sec
Reputation Power: 24
How?

Quote:
Originally Posted by Nilpo
If you burn using the Windows API (via the Roxio plugin), all you have to do is shell copy the files to the device drive. Windows will automatically add them to a temporary location. It's the equivalent of right-clicking a file and choosing your CD/RW device from the Send To menu.



Thanks Nilpo !

I get what you are saying but I just don't know how to do it. vbscripting is new to me. Most of my background is in access, vba, html, and a little DOS. I can read the code samples I have attached and understand most of it but there are still some gray areas. Do you have a sample script or our article you can point me to get started in the right direction?

Any help is appreciated.

Thanks in advance.

Reply With Quote
  #4  
Old June 24th, 2008, 03:11 PM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Beginner (1000 - 1499 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,253 Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Days 10 h 3 m 7 sec
Reputation Power: 667
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
I'm writing an article today on this topic. When I get it finished, I'll post the sample code here. Unfortunately, you'll have to wait for the article to go live here on ASP Free, but I'll be glad to help you through the sample code and get you up and running.

Reply With Quote
  #5  
Old June 30th, 2008, 08:25 PM
Namesniper Namesniper is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 11 Namesniper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 55 m 8 sec
Reputation Power: 0
I'll be looking for that article too.

Reply With Quote
  #6  
Old July 11th, 2008, 04:01 PM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Beginner (1000 - 1499 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,253 Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Days 10 h 3 m 7 sec
Reputation Power: 667
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
Still no word on when that article goes live, but here's to the code to burn a CD using the CD Writing Wizard in Windows XP.
vb Code:
Original - vb Code
  1. ' Provide the drive letter of your CD burner
  2. strDriveLetter = "E:\"
  3. ' Provide the source directory
  4. strSourceDirectory = "C:\Documents and Settings\John\My Documents"
  5. ' Provide a volume name for your CD (16 characters max)
  6. strCDName = "MyDocs"
  7.  
  8. Const MY_COMPUTER = &H11
  9.  
  10. Set WshShell = WScript.CreateObject("WScript.Shell")
  11. Set objShell = CreateObject("Shell.Application")
  12.  
  13. strBurnDirectory = WshShell.RegRead( _
  14.     "HKCU\Software\Microsoft\Windows\CurrentVersion\" _
  15.         & "Explorer\Shell Folders\CD Burning")
  16.  
  17. Set objFolder = objShell.Namespace(strSourceDirectory)
  18.  
  19. objShell.Namespace(strBurnDirectory).CopyHere objFolder.Items
  20.  
  21. objShell.NameSpace(&H11&).ParseName(strDriveLetter).InvokeVerbEx( _
  22.     "Write &these files to CD")
  23.  
  24. Do Until WshShell.AppActivate("CD Writing Wizard")
  25.     WScript.Sleep 200
  26. Loop
  27.  
  28. WshShell.AppActivate("CD Writing Wizard")
  29. WshShell.SendKeys strCDName
  30. WshShell.AppActivate("CD Writing Wizard")
  31. WshShell.SendKeys "{Enter}"
  32.  
  33. Do Until Not WshShell.AppActivate("CD Writing Wizard")
  34.     WScript.Sleep 200
  35. Loop

Reply With Quote
  #7  
Old July 11th, 2008, 08:52 PM
Namesniper Namesniper is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 11 Namesniper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 55 m 8 sec
Reputation Power: 0
Thanks for the code.

Reply With Quote
  #8  
Old July 11th, 2008, 09:22 PM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Beginner (1000 - 1499 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,253 Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)Nilpo User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 6 Days 10 h 3 m 7 sec
Reputation Power: 667
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
Quote:
Originally Posted by Namesniper
Thanks for the code.
No problem. Just an FYI: There is a better way of doing this using the IMAPI control. However, it does require IMAPI2. This is available on Windows Vista and Server 2008 out of box, but XP and Server 2003 will need an update.

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationWindows Scripting > Adding files to cd burn list using vbscript


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.