This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Using XCopyFile in Basic MSI
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2008
08:25 AM
Using XCopyFile in Basic MSI
I have a Basic MSI installation in IS Pro where I have two large folders (2.0 GB total) on a DVD that I need copied to the user's machine. If I create two components, one for each of the large folders, then it takes forever to build the installer, because it has to incorporate the large folders into the build.
What I did was not include the folders in the project, but rather just place them onto the DVD during the burning process. In the installer, after ExecuteAction in the UI sequence, I placed two InstallScript CAs. Each CA copies a folder using XCopyFile with the Include SubDirectory flag turned on.
What happens is that one folder is copied just fine. The second folder has 12 main folders under it, and a lot of subdirectories. So, when it's CA is run, only two of the subfolders are copied to the user's machine, but not the rest.
I know that if I go the CA route that I have to have a CA that uninstalls these folder's files. That's okay.
What I don't know is if I am using the best method for this. Must not be since it is not working properly.
What I did was not include the folders in the project, but rather just place them onto the DVD during the burning process. In the installer, after ExecuteAction in the UI sequence, I placed two InstallScript CAs. Each CA copies a folder using XCopyFile with the Include SubDirectory flag turned on.
What happens is that one folder is copied just fine. The second folder has 12 main folders under it, and a lot of subdirectories. So, when it's CA is run, only two of the subfolders are copied to the user's machine, but not the rest.
I know that if I go the CA route that I have to have a CA that uninstalls these folder's files. That's okay.
What I don't know is if I am using the best method for this. Must not be since it is not working properly.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2008
11:15 AM
I have found it helps if you create the folders prior to doing the XCopyFile.
CreateFolder("C:\\MyFolder1");
XCopyFile("D:\\MyFolder1\\*.*", "C:\\MyFolder1",INCLUDE_SUBDIRECTORIES");
I also mainly use VBscript CAs with BasicMSI projects to handle things with directories and files. I use Session.Property[INSTALLDIR] in the vbScript to get the installation path to move files there.
CreateFolder("C:\\MyFolder1");
XCopyFile("D:\\MyFolder1\\*.*", "C:\\MyFolder1",INCLUDE_SUBDIRECTORIES");
I also mainly use VBscript CAs with BasicMSI projects to handle things with directories and files. I use Session.Property[INSTALLDIR] in the vbScript to get the installation path to move files there.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2008
01:24 PM
Creating the folders first for one of the folders would be easy as there are no subdirectories. However, the other folder probably has a hundred or more subdirectories.
I'll try creating the initial folders and see what happens.
I'll try creating the initial folders and see what happens.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2008
03:16 PM
Sorry, this was to create the Top level only all subdirs should go with out problems, if the top folder exists.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2008
03:43 PM
I tried creating the two top level folders, but after the XCopyFile, the result was the same. Only a couple of the subfolders in the second folder are copied to the target dir.
This is a little puzzling. It may be failing because there are so many subdirectories.
The installation works fine outside of this. Perhaps I should drop the CAs, add these files to components, and just put up with the long build times.
Another option would be to create my own cabinet files for these, but in reading the Help, that is quite a bit more work.
This is a little puzzling. It may be failing because there are so many subdirectories.
The installation works fine outside of this. Perhaps I should drop the CAs, add these files to components, and just put up with the long build times.
Another option would be to create my own cabinet files for these, but in reading the Help, that is quite a bit more work.