Archive: trouble with copyfiles


trouble with copyfiles
i've been struggling with trying to get copyfiles to work properly. I know it has to be something ridiculous like a different syntax for my situation. I've tried many possibilities within my knowledge but trial and error is very long because my block of copyfiles is in the middle of an already maxed out install script.

for starters, I can't wrap them into the installer because they are very large video files, and i already have a large amount of videos already wrapped into the installer. I would love to mess with this and try to figure it out on my own, but i have a close approaching deadline to meet. here is my existing (relevant portion of) script:

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "E:\autorun test\setup.exe"
InstallDir "C:\Course Material"
ShowInstDetails show
ShowUnInstDetails show

Section "copyfiles"
SetOverwrite try
copyfiles "$EXEPATH\videos/using your eyes effectively.avi" "$INSTDIR/Video Master" 87253
copyfiles "$EXEPATH\videos/aggressive driving.avi" "$INSTDIR/Video Master" 169152
copyfiles "$EXEPATH\videos/breaking the accident chain of events.avi" "$INSTDIR/Video Master" 64637
copyfiles "$EXEPATH\videos/dangerous crossings, a second thought.avi" "$INSTDIR/Video Master" 111487
copyfiles "$EXEPATH\videos/dateline nbc.avi" "$INSTDIR/Video Master" 169793
copyfiles "$EXEPATH\videos/donate life.avi" "$INSTDIR/Video Master" 141773
copyfiles "$EXEPATH\videos/Drive it right.avi" "$INSTDIR/Video Master" 184341
copyfiles "$EXEPATH\videos/driving in bad weather.avi" "$INSTDIR/Video Master" 86608
copyfiles "$EXEPATH\videos/elliot method review.avi" "$INSTDIR/Video Master" 22547
copyfiles "$EXEPATH\videos/freeway driving.avi" "$INSTDIR/Video Master" 71737
copyfiles "$EXEPATH\videos/getting safely past the orange barrels.avi" "$INSTDIR/Video Master" 107049
copyfiles "$EXEPATH\videos/IDL.avi" "$INSTDIR/Video Master" 69012
copyfiles "$EXEPATH\videos/kids near road.avi" "$INSTDIR/Video Master" 20378
copyfiles "$EXEPATH\videos/managing time and space.avi" "$INSTDIR/Video Master" 82618
copyfiles "$EXEPATH\videos/motorcycles.avi" "$INSTDIR/Video Master" 73605
copyfiles "$EXEPATH\videos/night driving.avi" "$INSTDIR/Video Master" 80575
copyfiles "$EXEPATH\videos/no buzz busted.avi" "$INSTDIR/Video Master" 97962
copyfiles "$EXEPATH\videos/ped issues.avi" "$INSTDIR/Video Master" 1687
copyfiles "$EXEPATH\videos/railroads.avi" "$INSTDIR/Video Master" 1067
copyfiles "$EXEPATH\videos/red assphault 2.avi" "$INSTDIR/Video Master" 139432
copyfiles "$EXEPATH\videos/Share the Road.avi" "$INSTDIR/Video Master" 62935
copyfiles "$EXEPATH\videos/sharing the road with others.avi" "$INSTDIR/Video Master" 74154
copyfiles "$EXEPATH\videos/steering around cones.avi" "$INSTDIR/Video Master" 12165
copyfiles "$EXEPATH\videos/street racing.avi" "$INSTDIR/Video Master" 6789
copyfiles "$EXEPATH\videos/unlocking the mystery of ABS.avi" "$INSTDIR/Video Master" 142837
sectionend

Section "MainSection" SEC01
SetOutPath "$INSTDIR/Rescources\Class Notes"
File "H:\MUNRO NEWEST 4-29-09\Rescources\Class Notes\A1, A2, B1, B2.doc"
File "H:\MUNRO NEWEST 4-29-09\Rescources\Class Notes\C1, C2, D1, D2.doc"

...
othere things i've tried:

-placing videos in same folder as exe and using:
copyfiles "using your eyes effectively.avi" "$INSTDIR/Video Master" 87253

-placing videos in video folder and using:
copyfiles "videos/using your eyes effectively.avi" "$INSTDIR/Video Master" 87253

-not using file size:
copyfiles "using your eyes effectively.avi" "$INSTDIR/Video Master" 87253

-seperating the copy files into a clean script and running it works just fine but i just can't seem to incorporate it into my existing script




any help is greatly appreciated
-techtoast

$INSTDIR needs creating and / is not valid in Windows paths. You should be using \.

Stu


but isn't $INSTDIR is created here:

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "E:\autorun test\setup.exe"
InstallDir "C:\Course Material"
ShowInstDetails show
ShowUnInstDetails show

Section "copyfiles"
SetOverwrite try
copyfiles "$EXEPATH\videos/using your eyes effectively.avi" "$INSTDIR/Video Master" 87253

or am i wrong?
and thanks for the / tip!!!


Setting InstallDir does not automatically create the $INSTDIR directory. You have to use SetOutPath to create it.

Stu


thank you so much man! you are my hero!