Create a .config folder in the user folder

后端 未结 2 1052
一整个雨季
一整个雨季 2020-11-30 15:43

When installing my program, I\'d like to create a .config folder into the user\'s folder. For example :

C:\\Users\\MyUser\\.config
2条回答
  •  半阙折子戏
    2020-11-30 16:27

    To do this with WiX you need to use the CreateFolder element under the parent component. It's much the same question as this:

    how to create folder in Wix?

    As a better practice in my opinion, you should use the standard Windows Installer folder properties as locations. The full list is here:

    https://msdn.microsoft.com/en-us/library/windows/desktop/aa370905(v=vs.85).aspx#system_folder_properties

    for example ProgramFiles64Folder, AppDataFolder (which might be the best location for your directory), CommonAppDataFolder and so on.

提交回复
热议问题