How to copy file from CD to the user's desktop

I’m terribly new to applescripting, but I’ve done enough searches on this BBS to cobble together some bits to almost accomplish what I need to do.

My goal is to be able to be able to copy an Applescript standalone application, called “Connect to ISP”, from the data folder of the CD-ROM to the user’s desktop.


tell application "Finder" to set cd_name to item 1 of (get name of (disks whose ejectable = true)) 
set file_to_copy to (quoted form of POSIX path of ("Volumes:" & cd_name & ":DATA:Connect to ISP.app")) 
set target_file to (quoted form of POSIX path of ((path to desktop as string) & "Connect to ISP.app")) 
copy file_to_copy to target_file
end tell

What’s confusing Applescript, I think, is that a standalone Applescript application is actually a .app file, which is actually a unix folder. I also may have the syntax incorrect for the copy command. Can anyone steer me in the right direction?

Now that I think about it, I’d actually prefer to have the Applescript copy the file from the DATA folder whether it’s run from the CD or not. (Just copy from the RELATIVE path, based on where the Applescript is run from) Would that make life easier?

Does this work?

tell application "Finder"
	set cd_name to item 1 of (get name of (disks whose ejectable = true))
	set file_to_copy to "Volumes:" & cd_name & ":DATA:Connect to ISP.app"
	duplicate file file_to_copy to desktop
end tell

– Rob