|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2005
Location: Kolkata (Calcutta),India
Posts: 106
|
How to add sub-folder with its files inside the installation folder
I want to add my sub-folder say "Samples" inside my main installation folder
(INSTDIR) say "C:\DemoTransport". my sub-folder("Samples")contains around 2o files. My current coding is installing all the files of my sub-folder to the main installation folder ("C:\DemoTransport") only. How can I overcome it? Section "Complete" SEC01 SetOutPath "$INSTDIR" SetOverwrite ifnewer File "AppFolder\Transport.exe" CreateDirectory "$SMPROGRAMS\DemoTransport" ;CreateDirectory "$SMPROGRAMS\DemoTransport\Samples" CreateShortCut "$SMPROGRAMS\DemoTransport\DatabaseManager.lnk" "$INSTDIR\DBMngr.exe" CreateShortCut "$SMPROGRAMS\DemoTransport\DemoTransport.lnk" "$INSTDIR\Transport.exe" CreateShortCut "$DESKTOP\DemoTransport.lnk" "$INSTDIR\Transport.exe" File "AppFolder\DBMngr.exe" File "AppFolder\SFormat.TXT" File "AppFolder\DemoTransport.chm" CreateShortCut "$SMPROGRAMS\DemoTransport\Help.lnk" "$INSTDIR\DemoTransport.chm" SetOverwrite try File "AppFolder\Samples\B001.TXT" File "AppFolder\Samples\B002.TXT" File "AppFolder\Samples\B005.TXT" File "AppFolder\Samples\B007.TXT" |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Nov 2005
Location: Kolkata (Calcutta),India
Posts: 106
|
Until anyone of you help me out, I've written one crude solution for it. But please let me know the exact method.
The following example helps in creating sub-folder by the name "Samples" and copies all the reqd. files to it. The crude solution which is working for me is : Section "-Create Samples Folder" CreateDirectory "$INSTDIR\Samples" ;MessageBox MB_ICONINFORMATION|MB_OK "$INSTDIR\Samples" CopyFiles "$INSTDIR\*.FUS*" "$INSTDIR\Samples" CopyFiles "$INSTDIR\*.XLS*" "$INSTDIR\Samples" CopyFiles "$INSTDIR\*.BAK*" "$INSTDIR\Samples" CopyFiles "$INSTDIR\*.INI*" "$INSTDIR\Samples" Delete $INSTDIR\*.FUS Delete $INSTDIR\*.XLS Delete $INSTDIR\*.BAK Delete $INSTDIR\*.INI CopyFiles "$INSTDIR\Samples\Sformat.FUS" "$INSTDIR" SectionEnd |
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
You need to change the output path for the source files that would go into the Samples subdirectory:
PHP Code:
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Nov 2005
Location: Kolkata (Calcutta),India
Posts: 106
|
Dear Animaether,
Thanks for your help. It worked! |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|