Problem creating folders at install

Posted on 2005-05-09
Last Modified: 2010-04-23
I have a setup project for my application.
I added a few folders to the setup project that I need to put on the C:\ drive during install that are necessary for the program. ie.

     My Photos
     My Music
     My Junk

I clicked on the 'Main' folder and set its 'DefaultLocaton' to 'C:\' and its 'Always Create' to 'True'

Problem is when I install it doesn't make the folder structure in the C drive, (or anywhere else.)

How would I make a file structure on the C: drive during install?
Question by:Matrix1000
    LVL 13

    Assisted Solution

    Which installer are you using?
    Regardless of that, how about just creating the subdirectories when you first start the application(or if they're missing)? I do it this way, with the .net "xcopy-deployment" (he he) it'll save you some errors to troubleshoot...
    LVL 1

    Author Comment

    I'm just using the default Visual Studio installer...could you give me a code example? (I'm a noob:)

    LVL 10

    Expert Comment

    I think softplus means something like this

    If System.IO.Directory.Exists("C:\Main\My Photos") = False Then

    System.IO.Directory.CreateDirectory("C:\Main\My Photos")

    End If

    LVL 10

    Accepted Solution

    Ok, I've just run a quick test to find out how you can do what you want from a setup project.

    1  Right click on 'File System on Target Machine' & select Add Special Folder Name it whatever you like but I suggest something like 'Root of C drive'
    2  Set the DefaultLocation property to C:\
    3  Right click on your newly created special folder & select 'Add Folder' & name it Main then right click Main & select 'Add Folder' for each of the subfolders you want within there.
    4  You can now add files to these directories & when you run the install the directories will be created where you want them & the files copied to them.

    One other thing I doid was set Always Create = True

    LVL 1

    Author Comment

    Works Great Thanks!

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now