RegSetValueEx in Vista
-
i am writing a key data in registry by, lRetCode=RegSetValueEx(hDckey,sourceName,0,REG_SZ, (LPBYTE)RegFile, (DWORD) (_tcslen(RegFile)+1)*sizeof(TCHAR)); It didn't write value sourceName in registry, then i changed the "Privilege level" to "Run this program as administrator", now it writes this data. How to do this programmatically ? and i have some "cout" statements but they are not displaying to the console...what settings do i need for this ? please help me...
-
i am writing a key data in registry by, lRetCode=RegSetValueEx(hDckey,sourceName,0,REG_SZ, (LPBYTE)RegFile, (DWORD) (_tcslen(RegFile)+1)*sizeof(TCHAR)); It didn't write value sourceName in registry, then i changed the "Privilege level" to "Run this program as administrator", now it writes this data. How to do this programmatically ? and i have some "cout" statements but they are not displaying to the console...what settings do i need for this ? please help me...
Yashusid wrote:
It didn't write value sourceName in registry, then i changed the "Privilege level" to "Run this program as administrator", now it writes this data.
What reg key are you trying to write to? You're trying to write to a key that a non-admin doesn't have permission to write to.
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
-
Yashusid wrote:
It didn't write value sourceName in registry, then i changed the "Privilege level" to "Run this program as administrator", now it writes this data.
What reg key are you trying to write to? You're trying to write to a key that a non-admin doesn't have permission to write to.
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
-