如何更改Properties.Settings的默认路径

时间:2008-10-17 23:03:12

标签: .net properties.settings

每当我Properties.Settings.Save()时,它都会将属性更改为Application.LocalUserAppDataPath,但我希望路径为Application.CommonAppDataPath

其中

Application.CommonAppDataPath = 
C:\Documents and Settings\**All Users**\Application Data\xxxxx\xxxx\1.0.0.0


Application.LocalUserAppDataPath =
C:\Documents and Settings\**gsankar**\Local Settings\Application Data\xxxxx\xxxx\1.0.0.0

请告诉我是否可以更改。如果是的话,请告诉我怎么做?

1 个答案:

答案 0 :(得分:1)

在致电Properties.Settings.Default.ParentPath = Application.CommonAppDataPath;之前使用Properties.Settings.Save();