Log in

View Full Version : redirect password GUI in registry ?


choconlangthang
06-15-2006, 04:16 PM
hELLO everyone,
I'm following an example on MSdn to create a password proctection GUI.
http://support.microsoft.com/default.aspx?scid=kb;%5Bln%5D;314989#top
To make it load the customized password GUI, I create a key in registry, but it doesn't do the job.



CONST BYTE * pDt = new BYTE [200];
LPWSTR t = TEXT("\\Windows\\Password.cpl") ;
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 ) ;




I tried both AdminPassword and Password key, but still no result. Any idea, thanks.