Custom Action and AlwaysInstallElevated
Posted 13 May 2004 - 16:04
The problem arises in that I have a Custom Action (type 1) that attempts to set a registry value HKLM\Software\Microsoft\Windows NT\Winlogon\Userint and it always returns with access denied.
nReturn = RegOpenKeyEx(hKey, KeyPath, 0, KEY_WRITE , &hOpenKey);
if(nReturn == ERROR_FILE_NOT_FOUND )
nReturn = RegCreateKeyEx( hKey, KeyPath, 0, TEXT(""), REG_OPTION_NON_VOLATILE, KEY_WRITE, lpSecurityAttributes, &hOpenKey, &dummy);
if(nReturn == ERROR_SUCCESS)
// Set Registry to input
nReturn = RegSetValueEx( hOpenKey, Value, 0, nType, (BYTE*)pDataBuf, nSize );
RegCloseKey( hOpenKey );
Am i mis interputing the use of AlwaysInstallElevated ??
Posted 14 May 2004 - 10:27
Usually the Installer service is run by the LocalSystem account. This account does not have a HKCU, so make sure that you don't access the HKCU registry in that CA.
Why don't you use the registry table?
Posted 14 May 2004 - 12:40
Posted 15 May 2004 - 06:39
Posted 15 May 2004 - 06:40