cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
geo1st487
Level 5

Copy files from installation DVD to Hard disk

How to make installation program which copy files from directory in DVD to hard disk directory which choose the user?
The DVD includes setup program and a folder with many large files which want to copy on hard disk.
Thanks
Labels (1)
0 Kudos
(4) Replies
geo1st487
Level 5

Any idea ?
0 Kudos
Apoorv_Jain
Level 5

Make use of SRCDISK variable which is set to the drive where your setup is in.

So if you are running setup from a DVD which is say H: on the machine, SRCDISK is set to H:

Then store the path specified by user in some variable and use it for destination.

Your code would look something like this

XCopyFile(SRCDISK ^ "Path of the Folder on DVD" ^ "*.*",szPath,INCLUDE_SUBDIR | COMP_UPDATE_DATE);


where szPath is the path specified by the user.
0 Kudos
geo1st487
Level 5

Apoorv Jain wrote:
Make use of SRCDISK variable which is set to the drive where your setup is in.

So if you are running setup from a DVD which is say H: on the machine, SRCDISK is set to H:

Then store the path specified by user in some variable and use it for destination.

Your code would look something like this

XCopyFile(SRCDISK ^ "Path of the Folder on DVD" ^ "*.*",szPath,INCLUDE_SUBDIR | COMP_UPDATE_DATE);


where szPath is the path specified by the user.


I dont know which letter was the DVD from every user because some machines has different drive letter DVD. Any idea?
Thanks
0 Kudos
Apoorv_Jain
Level 5

You don't have to worry about that.
SRCDISK is automatically set to the drive letter.
0 Kudos