存储用户设置文件 [英] Storing user settings file
问题描述
我有一个正在构建的应用程序,将由共享PC上的许多不同用户使用。我希望能够在每个用户唯一的位置存储一些用户
设置,这样一个用户的
设置就不会影响另一个用户。有没有标准的存储的位置
这些文件?一个标准怎么样?如果用户还没有运行应用程序,那么存储默认文件的位置
设置?
TIA
Ron L >
" Ron L" < RO ** @ bogus.Address.com> schrieb:我有一个正在构建的应用程序,将由共享PC上的许多不同用户使用。我希望能够在每个用户独有的位置存储大量用户
设置,这样一个用户的设置就不会影响另一个用户。有没有标准的存储的位置
这些文件?一个标准怎么样?如果用户还没有运行应用程序,那么存储默认设置文件的位置?
\\\
Dim Path As String = _
Environment.GetFolderPath(_
Environment.SpecialFolder.LocalApplicationData _
)
///
-
MS Herfried K. Wagner
MVP< URL:http:/ /dotnet.mvps.org/>
VB< URL:http://classicvb.org/petition/>
Herfried
感谢您的回复。我假设这将获得个人用户的位置
,你知道如何获得一组默认值,或者
如果这些只是存储在与申请目录相同的目录?
TIA
Ron L
" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at>在消息中写道
news:uh ************** @ TK2MSFTNGP14.phx.gbl ..." Ron L" < RO ** @ bogus.Address.com> schrieb:我有一个正在构建的应用程序,将由共享PC上的许多不同用户使用。我希望能够在每个用户独有的位置存储一些
用户设置,这样一个用户的设置就不会影响另一个用户。有没有标准的位置来存储这些文件?一个标准怎么样?如果用户还没有运行应用程序,存储
默认设置文件的位置?
\\\
Dim Path As String = _
Environment.GetFolderPath(_
Environment.SpecialFolder.LocalApplicationData _
)
///
-
MS Herfried K .Wagner
MVP< URL:http://dotnet.mvps.org/>
VB< URL:http://classicvb.org/petition/>
Herfried
感谢您的回复。我假设这将获得个人用户的位置
,你知道如何获得一组默认值,或者
如果这些只是存储在与申请目录相同的目录?
TIA
Ron L
" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at>在消息中写道
news:uh ************** @ TK2MSFTNGP14.phx.gbl ..." Ron L" < RO ** @ bogus.Address.com> schrieb:我有一个正在构建的应用程序,将由共享PC上的许多不同用户使用。我希望能够在每个用户独有的位置存储一些
用户设置,这样一个用户的设置就不会影响另一个用户。有没有标准的位置来存储这些文件?一个标准怎么样?如果用户还没有运行应用程序,存储
默认设置文件的位置?
\\\
Dim Path As String = _
Environment.GetFolderPath(_
Environment.SpecialFolder.LocalApplicationData _
)
///
-
MS Herfried K .Wagner
MVP< URL:http://dotnet.mvps.org/>
VB< URL:http://classicvb.org/petition/>
I have an application we are building that will be used by a number of
different users on shared PCs. I want to be able to store a number of user
settings in a location that is unique for each user, so that one user''s
settings do not affect another. Is there a "standard" location to store
these files? How about a "standard" location to store a file of default
settings if the user hasn''t run the application yet?
TIA
Ron L
"Ron L" <ro**@bogus.Address.com> schrieb:I have an application we are building that will be used by a number of
different users on shared PCs. I want to be able to store a number of user
settings in a location that is unique for each user, so that one user''s
settings do not affect another. Is there a "standard" location to store
these files? How about a "standard" location to store a file of default
settings if the user hasn''t run the application yet?
\\\
Dim Path As String = _
Environment.GetFolderPath( _
Environment.SpecialFolder.LocalApplicationData _
)
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Herfried
Thank you for the response. I assume that this will get the location
for an individual user, do you know how to get one for a set of defaults, or
should those simply be stored in the same directory as the application?
TIA
Ron L
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uh**************@TK2MSFTNGP14.phx.gbl..."Ron L" <ro**@bogus.Address.com> schrieb:I have an application we are building that will be used by a number of
different users on shared PCs. I want to be able to store a number of
user settings in a location that is unique for each user, so that one
user''s settings do not affect another. Is there a "standard" location to
store these files? How about a "standard" location to store a file of
default settings if the user hasn''t run the application yet?
\\\
Dim Path As String = _
Environment.GetFolderPath( _
Environment.SpecialFolder.LocalApplicationData _
)
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Herfried
Thank you for the response. I assume that this will get the location
for an individual user, do you know how to get one for a set of defaults, or
should those simply be stored in the same directory as the application?
TIA
Ron L
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uh**************@TK2MSFTNGP14.phx.gbl..."Ron L" <ro**@bogus.Address.com> schrieb:I have an application we are building that will be used by a number of
different users on shared PCs. I want to be able to store a number of
user settings in a location that is unique for each user, so that one
user''s settings do not affect another. Is there a "standard" location to
store these files? How about a "standard" location to store a file of
default settings if the user hasn''t run the application yet?
\\\
Dim Path As String = _
Environment.GetFolderPath( _
Environment.SpecialFolder.LocalApplicationData _
)
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
这篇关于存储用户设置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!