为Windows XP和Vista应用程序保存用户信息的最佳场所 [英] Best place to save user information for Windows XP and Vista applications
问题描述
我需要以加密形式将用户的登录信息保存在我正在构建的该应用程序中,但是我不确定保存文件的最佳位置.我不想像每个用户一样将其保存到程序应用程序文件夹中.
I need to save a user's login information in encrypted form for this application I'm building, but I'm not sure of the best place to save the file. I don't want to save it into the program application folder as I want it per user.
那么将其保存到的最佳文件夹(或方式)是什么?
So what is the best folder (or way) to save it into?
使用C ++.
推荐答案
Seems like C:\Documents and Settings\%username%\Local Settings\Application Data may be the appropriate place according to Wikipedia. The article says this location is used for "User-specific and computer-specific application settings".
Cruizer在评论中指出(我会在那儿回答,但我还不能发表评论),在Vista中它是C:\ Users \%username%,并且不应该进行硬编码.谢谢.
Cruizer pointed out in the comments (I'd reply there but I can't comment yet) that in Vista it is C:\Users\%username% and that it shouldn't be hard-coded. Thanks.
这篇关于为Windows XP和Vista应用程序保存用户信息的最佳场所的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!