What is the WiX equivilent of Environment.SpecialFolder.ApplicationData from .NET?

前端 未结 1 1992
借酒劲吻你
借酒劲吻你 2020-12-24 06:51

I need to install a file into the Environment.SpecialFolder.ApplicationData folder, which differs between XP and Vista. Is there a built in way to reference the

1条回答
  •  余生分开走
    2020-12-24 07:26

    Use Directory element with Id set to AppDataFolder:

    
      
        
          
        
      
    
    

    This will result in test1.txt being installed to C:\Users\username\AppData\Roaming\My on Windows 7 and to C:\Documents and Settings\username\Application Data\My on Windows XP.

    MSDN has a list of properties that you can use to reference special folders.

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