Thursday, February 10, 2011

(Setup & Deployment) Create a folder & rename destination folder

Hi all,

I've been using Visual Studio's Setup & Deployment Project to create an installer for a windows service and what i need is to create a folder within the application folder when the installer is run. How would i go about doing this? I tried adding a folder to the Application Folder in the File System on Target Machine bar, but that's not working.

Also is there a way to specify what the name of the application folder will be? Right now i have a solution named Tracker.Import.Service and the output folder the install creates is Tracker.Import.Service.

Thanks

  • Did you put anything in the sub-folder you created in the Application Folder? Try adding a target text file to the sub-folder.

    If the sub-folder is empty it will not be created. The installer project will not detect any dependencies on it and will not add it the installer package.

    You can set a default for the Application Directory by

    • Viewing "Target System on Local Machine"
    • right clicking on "Application Folder" and selecting properties.
    • Set the value of DefaultLocation to the directory where you want the application installed.
  • Further to Jeff's response above, an empty sub-folder will be created if you set the AlwaysCreate flag for the directory to true via the properties panel (it is false by default).

0 comments:

Post a Comment