A Program that Automatically Copies and Opens a file

sarfrazkhan

New Member
I would like to write a program that automatically copies a file from a CD to the "My Documents" folder.
I'm working on making a spreadsheet available from a CD and don't want the user to have to manually save the file to their computer.

Would it also be possible to edit the program so it copies the file to "My Documents." AND opens the file from that location at the same time?

Any advice?
 

Ryan_Fpv

New Member
Sounds more like you're trying to make a virus autorun from CD... Rather outdated if you ask me, you'd be better off using flash drives, everyone has them these days.

Anyway, you can just make a shortcut on the hard drive (in My Documents if you wish) to the file(s) that is/are on the disc, and when they put the disc in they can just click the shortcut which will load it from the disc... If they don't have the disc in, it won't find the file and won't work. If the disc is in, it will load up.
Depending on your intentions this may or may not suit what you're trying to do.

Alternatively you can just make an autorun script and stick that on the disc, but I don't know if you can set it to automatically copy a file over, it's more or less used for opening a file.
In notepad:
"[autorun]
open=Filename.exe"
save the file as "autorun.inf" and put the file in the root folder of the CD (not in a subfolder)
 
Top