Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 136,420 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,361 people online right now. Registration is fast and FREE... Join Now!




copy folders from dir w/install files into install target dir

 
Reply to this topicStart new topic

copy folders from dir w/install files into install target dir

dirigible
14 Oct, 2008 - 10:47 AM
Post #1

New D.I.C Head
*

Joined: 2 Oct, 2008
Posts: 12


My Contributions
I posted similar question to this last week, but found a work around. Now I'm stuck on something similar yet different enough to make my workaround inapplicable. sad.gif

I have a program that includes a setup and deployment project. When the program gets installed, I also want it to copy resources from a /resources sub-directory of the dir that contains the install files to a subdirectory in the target directory.

This must occur at installation (not runtime) because after the install, the user could remove the CD or media that contains the install and resource files from the system.

This means I would have to:
1. Identify the install source dir (which is easy...)
2. Idenitfy the target dir.
3. Run some kind of batch or code to copy 1 to 2.

What do you think my options are? Any ideas?

Thanks for your help!


User is offlineProfile CardPM
+Quote Post

jg007
RE: Copy Folders From Dir W/install Files Into Install Target Dir
14 Oct, 2008 - 11:27 AM
Post #2

New D.I.C Head
*

Joined: 23 Mar, 2008
Posts: 26



Thanked: 1 times
My Contributions
is this any use?

http://vbcity.com/forums/topic.asp?tid=83928

or this -

http://www.devx.com/dotnet/Article/20849/0/page/1

This post has been edited by jg007: 14 Oct, 2008 - 11:32 AM
User is offlineProfile CardPM
+Quote Post

magicmonkey
RE: Copy Folders From Dir W/install Files Into Install Target Dir
14 Oct, 2008 - 11:48 AM
Post #3

D.I.C Regular
***

Joined: 12 Sep, 2008
Posts: 418



Thanked: 68 times
My Contributions
Hmmm let me try this step by step...

Method 1 (Must be updated as files are changed/added)
1. Open 'File System Editor' under Setup project.
2. Select Application Folder
3. Right click in right pane and select 'Add> Folder'
4. Name the Folder
5. Make sure folder is selected
6. Right click on right pane and select 'Add> File'
7. Select the files you want to deploy with your application

Method 2 (Will include all files marked as content in project)
1. Copy the directory and its files into your project's directory
2. Select Show All Files in solution explorer
3. Right click on folder from step 1 and select Include In Project
6. Right click on setup project in solution explorer and select 'Add> Project Output'
7. Select 'Content Files' from the project
8. If you want to pack them outside of the .MSI file then select the 'Content File from ....' and change the PackageAs to loose.

Hope that is what you were looking for.,

User is offlineProfile CardPM
+Quote Post

dirigible
RE: Copy Folders From Dir W/install Files Into Install Target Dir
14 Oct, 2008 - 12:18 PM
Post #4

New D.I.C Head
*

Joined: 2 Oct, 2008
Posts: 12


My Contributions
I have already packaged a large number of files with the application to be deployed during install. This isn't a problem.

The problem is that the ones in my/resources folder will change from install to install. The setup and deployment project wants to know exactly which files to package with the installer, but it can't. That why the installer needs to copy the entire directory and its components into the target dir rather than deploying them (which implies the files are associated with the installer (whether actually inside the .msi or not).

A little background:
I've got two apps. One is a utility that allows a user to use a button and menu system to launch PDF files via shell. The second is a utility that creates configuration files that tells the second app the button names & list entires & names of the PDF files that they're supposed to launch.
I want to be able to distribute the second app independently. After its installer is created, I use the second app to generate/copy all the resource files (PDF files, configuration files) to a location that is accessible to the viewer's installer.

Because I create the configuration data after the installer for the viewer is built, I can't include the resource files in it. It has to be located outside the installer, but in a location where the installer can reach it and copy it into its target dir.
This is the bit I'm struggling with.

I'm toying with your method #2, but I',m not sure it will work... I need to issue a blanket copy /resource directory and all its files into the install target dir type command, and I don't know if the setup project provides a good way to do this....



User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 01:10PM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month