AnJack
7/27/2007 8:06:00 PM
Witam,
Ma ktos proste rozwiazanie problemu jak utworzyc klucz w rejestrze
WinXP na koncie bez praw admina w HKEY_CURRENT_USER? Mnie sie to nie
udaje. Przewertowalem juz archiwa grup na googlach i nic nie pomaga.
Robie to tak:
char szTaskmanRegKey[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System";
DWORD phkResult;
DWORD lpdwDisposition;
RegCreateKeyEx(
HKEY_CURRENT_USER, // handle of an open key
szTaskmanRegKey, // address of subkey name
0, // reserved
NULL, // address of class string
REG_OPTION_NON_VOLATILE, // special options flag
KEY_WRITE, // desired security access
NULL, // address of key security structure
(PHKEY)&phkResult, // address of buffer for opened handle
(LPDWORD)&lpdwDisposition // address of disposition value buffer
);
Pozdrawiam.