How to add sub-directories to the target machine in a .NET setup project

J

jimmyfishbean

Hi,

Please could someone tell me how to add sub-directories to the target
installation directory when during a .Net setup project installation.
I have added a setup project and my application EXE and DLLs are all
OK, but I cannot get my installer package to add additional items.

I am using VS.Net 2003. I need to add 4 folders and 2 .XSL files onto
the user's machine (and remove these if the application - a .Net
Windows service) is removed. Any guidance (i.e. links or steps) is
much appreciated.

Thanks.

Jimmy
 
C

Chris Dunaway

In your setup project, open the File System editor. Right click on the
Application Folder and choose Add Folder. Then right click on the
folder you just created and choose Add File... and add the files from
the project you want in those folders.

You might have to add the files to the project and set their Build
Action to Content.
 
J

jimmyfishbean

Hi Chris,

I need to add empty folders only (no files). Is it possible to set the
Build Action for folders to Content?? I have tried to figure it out but
cannot.

Thanks,

Jimmy
 
C

Chris Dunaway

I don't mean add the folder to your project, I mean in the setup
project, click on the File System Editor. Then right click on
"Application Folder" and choose New > Folder. Then select that folder
and set the "Always Create" property to True. Then when you install
the application, that folder will be created.
 
J

jimmyfishbean

Chris said:
I don't mean add the folder to your project, I mean in the setup
project, click on the File System Editor. Then right click on
"Application Folder" and choose New > Folder. Then select that folder
and set the "Always Create" property to True. Then when you install
the application, that folder will be created

Hi Chris,

Thanks for that. I can create/remove the folders now.

However, I also need to add some files, which are getting installed as
expected. The problem with these files is that they are not being
removed when I uninstall the application.

I have tried setting the file's Permanent property to TRUE and also
FALSE, but the same result occurs (i.e. they are not being removed).

Is it some other property that I need to set? Thanks.

Jimmy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top