none
Visual C# Setup Project - HOW do I create a folder when installing?

    Question

  • Hi!


    I'm having a problem that SHOULD be simple to solve:

    The only thing I want to do, is create a folder (other that my app folder) called:

    C:\[FOLDERNAME]

    on my C-drive.

    How do I do this in a Setup Project?

    Whenever I choose to create a "Custom Folder" in the project it seems like Visual Studio just ignores it...


    Thanks
    /Kjaer

    Friday, June 20, 2008 1:46 PM

Answers

  • That is actually in accurate Kjaer, what it would be is the following

     

    FileSystem

      |

      | - - > Application Folder (Contains software where it will be installed)

      |         

      | - - > CustomFolder (This is just a pointer. Make sure the following property is there DefaultLocation = C:\)

      |           |

      |           | - - > TestFolder (This will actually be the folder that gets Created C:\TestFolder)

      |           |           |

      |           |           | - - > about.txt (path would be C:\TestFolder\about.txt)

     

    Hope this helps

    Friday, June 20, 2008 9:07 PM

All replies

  •  

    Right click on the set up project > View > File System

     

    You can add items that will be sent to the user's desktop, user's programs menu, and the directory after the root of the application folder

     

    In your senario if you have the application folder be C:\ (Which can be changed during instal) you will just right click on application folder > Add > Folder name the folder "Custom Folder" and you are done.

    Friday, June 20, 2008 5:05 PM
  •  Nicolas F. Mesa wrote:

     

    Right click on the set up project > View > File System

     

    You can add items that will be sent to the user's desktop, user's programs menu, and the directory after the root of the application folder

     

    In your senario if you have the application folder be C:\ (Which can be changed during instal) you will just right click on application folder > Add > Folder name the folder "Custom Folder" and you are done.

     

    Wow I am sorry I seem to need to learn how to read, I read your post over again and now see not in the app folder, sorry about that... :-|

    Friday, June 20, 2008 5:11 PM
  •  

    Now after my usless post prior to this, I wanted to make sure I confirmed prior to speaking again.

     

    1. You will create your "Custom Folder"
    2. Name the folder what ever you want
    3. Right Click on the folder go to properties
    4. Set the DefaultLocation property to wherever you want it to go (i.e. C:\)
    5. Create the property name something other than the comon property names (i.e. dont use TARGETDIR) In my senario I left it at NEWPROPERTY1
    6. In there you will create the directory you want to be created from that point on, just like the app folder

    Sorry for not reading before, and hope this answers your question

    --Nicolas

    Friday, June 20, 2008 5:24 PM
  • Hi again!

     

    I'm sorry, but it doesn't seem to work for me. I'll try to explain the project (og the files/folders in the "File System" view):

     

    "File System on Target Machine"

    |

    |

    -----> "Application Folder" (containing my software)

    |

    |

    -----> "My Custom Folder" (the folder I want to create on the users computer) (containing all the files the software refers to that is a .PDF help file and a .TXT file).

     

    Whenever I install the software with the .MSI file, all the files (including the files I put in "My Custo Folder") are put in the folder that the end user selects  to install the program to?

     

    Thanks

    /Kjaer

     

    Friday, June 20, 2008 8:57 PM
  • That is actually in accurate Kjaer, what it would be is the following

     

    FileSystem

      |

      | - - > Application Folder (Contains software where it will be installed)

      |         

      | - - > CustomFolder (This is just a pointer. Make sure the following property is there DefaultLocation = C:\)

      |           |

      |           | - - > TestFolder (This will actually be the folder that gets Created C:\TestFolder)

      |           |           |

      |           |           | - - > about.txt (path would be C:\TestFolder\about.txt)

     

    Hope this helps

    Friday, June 20, 2008 9:07 PM
  •  

    Hi Nicolas!

     

    You've just saved me! Thank you very much! It works perfectly know!

     

    Thanks again.

     

    /Kjaer

    Saturday, June 21, 2008 11:04 AM