c# - System-wide setting in Windows 7 and 8 - Registry is no longer useful? -
i want track setting system-wide on target machine- run time counter keeps track of how many times client runs software. decided put value in registry, want track how many times run whole system, not current user account.
i expect use hklm track @ machine level, uac doesn't nowdays.
is there correct way read , write setting machine-wide?
hklm isn't type of use (since windows xp @ least).
use %programdata% folder instead (which can via winapi function shgetknownfolderpath folderid_programdata (shgetfolderpath csidl_appdata on windows versions prior vista). it's designed application data global users of machine. (on windows 7, c:\programdata folder default.) application should create directory beneath there , store counter information in file in location instead.
(it means don't have defeat purpose of uac allowing public write access registry in inappropriate locations.)
Comments
Post a Comment