Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > User Defineable Custom Folder
 

User Defineable Custom Folder

Hi,

How would I do the following in a Visual Studio 2008 Setup-Project:

-- Set a custom folder's "DefaultLocation" at run time by the user.
-- Add an existing directory structure to a custom folder.

Can anyone suggest any good resources?

Thanks.

--Lenard

Lenardd  Sunday, August 23, 2009 6:28 PM
Hi Lenardd,

I have read your post and here is my doubt with your question.

--Set a custom folder's "DefaultLocation" at run time by the user.

What does it mean "change DefaultLocation at run time"?

--Add an existing directory structure to a custom folder.

You can create folder in your setup project under "Application Folder" node. Once you add files to a subfolder, it will install these files into subfolder under your application root folder. Does this what you ask for?

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Tuesday, August 25, 2009 10:01 AM
There are a couple of examples here around figure 12. In general you can create a custom folder based on a search:

http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/

or you can define a folder based on any of the Windows Installer folder properties:

http://msdn.microsoft.com/en-us/library/aa370905(VS.85).aspx#system_folder_properties
Phil Wilson
PhilWilson  Tuesday, August 25, 2009 6:44 PM
Kira,

No, that was not my question.

For example, in INNO Setup, if I have a folder called Help (with subfolders and files under it) in my Windows file system, I would be able to install it on the target computer simply by specifying it in a script like:

Source: "c:\Projects\VS\Calculator\Help\*"; DestDir: {app};

I would like to do something similar via VBScript or GUI in Visual Basic 2008.

--Lenard


Lenardd  Tuesday, August 25, 2009 9:07 PM
Hi Lenardd,

Sorry for misunderstanding you. In Visual Studio setup project, you need to add additional files to the project first, so they can be included to the MSI package. Vs doesn't allow you to run script before install any files. MSI does support to run custom action code during installation. But it fired only after all files are copied.

To add files and create subfolder is very convenience in VS. PhilWilson has given a good article about create custom folder in Vs and all the step to use VS setup project. Does that help you?

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Wednesday, August 26, 2009 2:20 AM
Kira,

No, Phil's example did not help.

I going to go third-party for my setup. I don't have much more energy left to work with VS Setup anymore. I've already wasted over a week trying to accomplish things that should be simple.

Thanks for your help Kira.

--Lenard
Lenardd  Wednesday, August 26, 2009 4:36 AM

You can use google to search for other answers

Custom Search

More Threads

• Upgrading version
• Install Certificate for WSE 3.0 Encryption via ClickOnce
• Trust an assembly by Strong Name
• Application deployment to a device
• ClickOnce not working without Windows Installer 3.1
• Configuration File Question
• Set bootstrapped SQL Express 2005 to install with mixed mode authentication.
• Creating Set-Up file
• Running an MSI from within a ClickOnce Deployment
• msiexec gets blocked by antivirus software