Special Folder “Common Application Data Folder” not available in my setup project. Why?

前端 未结 2 911
北恋
北恋 2021-01-12 12:39

I want to create a Visual Studio 2010 setup project that deploys some files to a folder where my application can use it from. I want it so, that all users h

相关标签:
2条回答
  • 2021-01-12 13:14

    Visual Studio setup projects do not have a predefined folder for common Application Data. However, you can install files in it like this:

    • add a custom folder and select it
    • in its Properties pane set DefaultLocation to:

    [CommonAppDataFolder]
    
    • in this folder add the files you want installed in common Application Data

    During install CommonAppDataFolder will be automatically resolved by Windows Installer.

    0 讨论(0)
  • 2021-01-12 13:23

    A more specific solution might be to set the DefaultLocation property to:

    [CommonAppDataFolder][Manufacturer]\[ProductName]
    

    Manufacturer and ProductName will be resolved from the values you assign to the corresponding properties of the setup project.

    0 讨论(0)
提交回复
热议问题