Using string in Application Folder DefaultLocation RRS feed

  • Question

  • Hello friends,

    I want to install my application to a spesific folder instead of [ProgramFilesFolder]\[Manufacturer]\[ProductName] . Exactly C:/SomeFolder/SomeFolder2/

    But DefaultLocation property does not let me use string.

    How can this possible?

    Thank you all.

    Emrah Ustun
    Friday, September 24, 2010 6:58 AM


  • Hello Ustun,

    To change the default location where a folder will be installed on the target computer, you could modify the DefaultLocation property of the Application Folder in the setup project.

    You cannot directly typing the path to the DefaultLocation property, actually its value is depend on what exactly your SomeFolder is. For example, is you want to install your application to 'C:\Program Files\Common Files\MyApp\', then you should set the DefaultLocation property to [CommonFilesFolder]\MyApp , other examples like:

    (file path on Vista: 'C:\Program Files\MyApp\')

    (file path on Vista: 'C:\Windows\system32\MyApp\')

    (file path on Vista: 'C:\Users\v-hezhou\AppData\Roaming\MyApp\')

    (file path on Vista: 'C:\Users\v-hezhou\Favorites\MyApp\')

    For more about the folders, you may refer to System Folder Properties http://msdn.microsoft.com/en-us/library/aa372057.aspx, it provides links to more information about system folders that the installer sets at setup

    Best wishes,
    Helen Zhou

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by Helen Zhou Monday, October 4, 2010 2:48 AM
    Wednesday, September 29, 2010 6:19 AM