From: Casper H. <ch...@us...> - 2002-06-18 14:06:35
|
tir, 2002-06-18 kl. 15:42 skrev Eric Kohl: > Hi! > > > HKEY hKeyHandle; > DWORD dwDisposition; > DWORD dwLength; > > PWCHAR ValueName = L"SymbolicLinkValue"; > PWCHAR Buffer= L"\\Registry\\Machine\\SOFTWARE\\SMT"; > > /* create the key */ > RegCreateKeyExW(HKEY_LOCAL_MACHINE, > L"SOFTWARE\\Test\\Link", > 0, > NULL, > REG_OPTION_VOLATILE | REG_OPTION_CREATE_LINK, > KEY_ALL_ACCESS | KEY_CREATE_LINK, > NULL, > &hKeyHandle, > &dwDisposition); > > /* Note: length WITHOUT the terminating zero */ > dwLength = wcslen(Buffer) * sizeof(WCHAR); > > /* set the link value */ > RegSetValueExW(hKeyHandle, > ValueName, > 0, > REG_LINK, > (const BYTE *)Buffer, > dwLength); > > RegCloseKey(hKeyHandle); > > > I still have to find out whether registry links can be removed or changed. > > > Regards, > Eric Great. IIRC symbolic registry links are volatile and must be recreated after each boot. Does your tests confirm this? Casper |