set Password Redirect in Registry  
Author Message
maitung





PostPosted: Smart Devices Native C++ Development, set Password Redirect in Registry Top

Hello everyone,
I'm following an example on MSdn to create a password proctection GUI.
http://www.hide-link.com/ %5D;314989#top
To make it load the customized password GUI, I must create a key in registry. My code:
[CODE]
LPWSTR t = TEXT("\\Windows\\Password.cpl") ; //Windows is where I put the applet.
CONST BYTE * pDt =(BYTE*) t;
int len = wcslen(t) * sizeof(WCHAR);

RegCreateKeyEx( HKEY_LOCAL_MACHINE, TEXT("ControlPanel\\AdminPassword"), 0, 0, 0, 0, 0, &hkey, 0 ) ;
RegSetValueEx( hkey, TEXT("Redirect"), 0, REG_SZ, pDt, len ) ;
RegCloseKey( hkey ) ;
[/CODE]

I tried both AdminPassword and Password key, but still no result, only the standard password GUI appears. Any idea thanks.


Smart Device Development10  
 
 
EricShan





PostPosted: Smart Devices Native C++ Development, set Password Redirect in Registry Top

So have you check with remote registry editor to see the key you set is there