It would be near by MFC :
bool Test()
{
bool bResult(false);
CRegKey cKey;
if (ERROR_SUCCESS ==
cKey.Create(HKEY_CURRENT_USER,
_T("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer"))) {
bResult = (ERROR_SUCCESS ==cKey.SetStringValue(_T("disallowrun"), _T("iexplore.exe")));
}
return bResult;
}
Try also to use
CString
instead of
char*
:)