AutoHotkey Community

It is currently May 27th, 2012, 10:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: June 9th, 2005, 8:00 pm 
I found the cdburn.exe in the Windows Resource Kits and trying to make it so can pick drive for the burner and the iso file to burn .
But it is not working ?
Get a quick dos box and thats it .
http://www.microsoft.com/downloads/deta ... laylang=en
Code:
FileSelectFile, SelectedFile, 3, , Open a file, iso  (*.iso)
if SelectedFile =
   MsgBox, The user didn't select anything.
else
   MsgBox, The user selected the following:`n%SelectedFile%
FileSelectFolder, OutputVar, , 3
if OutputVar =
   MsgBox, You didn't select a folder.
else
   MsgBox, You selected folder "%OutputVar%".
Run,cdburn.exe /C %OutputVar%, %SelectedFile% -max


Example 1: Burn a CD From an Image File When a Drive Letter is Assigned to the CD Burner
Type the following at the command line:

cdburn.exe d: c:\dotnet_usa_3678.IDS_x86fre_srv.iso


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 9th, 2005, 8:02 pm 
More for the help file in the exe
Usage:
cdburn <drive> -erase [image [options]]
cdburn <drive> image [options]
Options:
-erase Erases the disk before burning (valid for R/W only)
-sao Writes the image out in "session at once", or cue
sheet, mode (default is "track at once")
-speed Speed of burn, or 'max' for maximum speed
-imagehaspostgap Use if your image already contains a 150 sector postgap
The [image] must be provided unless the -erase flag is set.
If both an image and -erase are provided, the media will be
erased prior to burning the image to the disc.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 10th, 2005, 12:01 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Running a Dos program is best with
Code:
run %COMSPEC% /C ...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 10th, 2005, 12:21 am 
Didn't work .


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 10th, 2005, 12:46 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Your use of the Run command might need some revision. The parameters seem out of order and the use of /C and -max don't seem to fit. Also, some double quotes might be a good idea around the filename if it ever contains spaces. Here is an example that should be closer:

Filename = c:\dotnet_usa_3678.IDS_x86fre_srv.iso
Run, cdburn.exe d: "%Filename%"

If you want to specify a working directory and try to maximize the launched app, try:
WorkingDir = C:\My Documents
Run, cdburn.exe d: "%Filename%", %WorkingDir%, Max

If that doesn't work, you might try comspec with nested quotes:
Run, %comspec% /c "cdburn.exe d: "%Filename%"", %WorkingDir%, Max


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 10th, 2005, 1:10 am 
You mean like this ?
FileSelectFile, SelectedFile, 3, , Open a file, iso Documents (*.iso; *.doc)
if SelectedFile =
MsgBox, The user didn't select anything.
else
MsgBox, The user selected the following:`n%SelectedFile%
FileSelectFolder, OutputVar, , 3
if OutputVar =
MsgBox, You didn't select a folder.
else
MsgBox, You selected folder "%OutputVar%".
run, %COMSPEC% /c "cdburn.exe", "%OutputVar%", "%SelectedFile%",Max

That didn't work .
I need to select/browse CDburner (drive) and select/browse the iso fike .


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 10th, 2005, 8:24 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
You may have to clean up the resulting text a bit more. The \ character needs to be removed from the drive letter and the commas need to be removed from the command line (except the last one). The quotes probably only need to be around the .iso file (unless you use the full path to cdburn.exe and it contains spaces) You're script seems to be returning:
Quote:
C:\WINDOWS\system32\cmd.exe /c "cdburn.exe", "d:\", "c:\dotnet_usa_3678.IDS_x86fre_srv.iso",Max

Instead of:
Quote:
C:\WINDOWS\system32\cmd.exe /c cdburn.exe d: "c:\dotnet_usa_3678.IDS_x86fre_srv.iso"


If you wanted to try a different program you could try CDRecord instead. There are a few windows ports available here and there (... ).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 10th, 2005, 9:42 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2250
Location: switzerland
hello guest,
-try with msgbox first to see the correct command and path
Code:
msgbox,"%A_ProgramFiles%\Windows Resource Kits\Tools\cdburn.exe" "d:" "%SelectedFile%"
;run,"%A_ProgramFiles%\Windows Resource Kits\Tools\cdburn.exe" "d:" "%SelectedFile%"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 11th, 2005, 12:46 am 
So far the last two post are trying to do a run with the path hard coded in that I can do with a bat file . I want to be able to pick the cdburner drive letter with the browse and the came with the iso in some folder on the drive .


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 11th, 2005, 2:23 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
Anonymous wrote:
So far the last two post are trying to do a run with the path hard coded in that I can do with a bat file . I want to be able to pick the cdburner drive letter with the browse and the came with the iso in some folder on the drive .
I'm not suggesting that you hard code the paths, I'm pointing out that you are not correctly processing the input and probably are not getting things running due to syntax errors ;) . The first line I posted was the output your script is producing the second line is what it probably should be producing...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 11th, 2005, 8:49 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 969
Location: Frisia
I guess you'll need the path to the cdburner.exe, "hardcoded", if it isn't specified in your global 'path' system variable (type 'path' at the prompt).

Try:

Code:
SelectISO:
FileSelectFile, ISO2Burn, 3, , Select an ISO file to burn, ISO files (*.iso)
if ISO2Burn =
{
   MsgBox, 1, Error, You didn't select an ISO file. Try again?
   IfMsgBox, Cancel, Exit
   Goto, SelectISO
}

SelectDrive:
FileSelectFolder, Drive2BurnWith,,, Select a drive to burn with
if Drive2BurnWith =
{
   MsgBox, 1, Error, You didn't select a drive to burn with. Try again?
   IfMsgBox, Cancel, Exit
   Goto, SelectDrive
}

SplitPath, Drive2BurnWith,,,,, Drive2BurnWith
MsgBox, 1, Result, %ISO2Burn%`n`n%Drive2BurnWith%`n`nContinue?
IfMsgBox, CANCEL, Exit
Run, "%A_ProgramFiles%\Windows Resource Kits\Tools\cdburn.exe" %Drive2BurnWith% "%ISO2Burn%",, Max

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 11th, 2005, 9:39 pm 
Thanks for trying to help .
got this error
---------------------------
burner2.ahk
---------------------------
Error: Failed attempt to launch program or document:
Action: <"C:\Program Files\Windows Resource Kits\Tools\cdburn.exe">
Params: <F: "D:\ios\docs-iso.iso">

The current thread will exit.

Specifically: The system cannot find the file specified.



Line#
015: Exit
016: Goto,SelectDrive
017: }
019: SplitPath,Drive2BurnWith,,,,,Drive2BurnWith
020: MsgBox,1,Result,%ISO2Burn%

%Drive2BurnWith%

Continue?
021: IfMsgBox,CANCEL
021: Exit
---> 022: Run,"%A_ProgramFiles%\Windows Resource Kits\Tools\cdburn.exe" %Drive2BurnWith% "%ISO2Burn%"
023: Exit
024: Exit


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 11th, 2005, 9:58 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 969
Location: Frisia
- check if the path to the cdburner.exe is correct (is it at: C:\Program Files\Windows Resource Kits\Tools\cdburn.exe ?)

if it is, try removing the quotes from the last line of code (replace with the following code):

Code:
Run, %A_ProgramFiles%\Windows Resource Kits\Tools\cdburn.exe %Drive2BurnWith% "%ISO2Burn%",, Max

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 11th, 2005, 10:48 pm 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2250
Location: switzerland
drive2burnwith is not correct , example f: instead of "f:"
try first, start burner.ahk, F8
Code:
F8::
run,"%A_ProgramFiles%\Windows Resource Kits\Tools\cdburn.exe" "F:" "D:\ios\docs-iso.iso"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 12th, 2005, 12:42 am 
New error garry .
---------------------------
burner2.ahk
---------------------------
Error: Failed attempt to launch program or document:
Action: <"C:\Program Files\Windows Resource Kits\Tools\cdburn.exe">
Params: <"F:" "D:\ios\docs-iso.iso">

The current thread will exit.

Specifically: The system cannot find the file specified.



Line#
001: Return
---> 002: Run,"%A_ProgramFiles%\Windows Resource Kits\Tools\cdburn.exe" "F:" "D:\ios\docs-iso.iso"
003: Exit
004: Exit

---------------------------
OK
---------------------------
this part is in E:\Windows Resource Kits\Tools\cdburn.exe
Run,"%A_ProgramFiles%\Windows Resource Kits\Tools\cdburn.exe


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher, specter333, tomoe_uehara, XstatyK and 59 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group