Hola, te paso información que figura en ayuda de windows.. y función ejemplo de llamadas desde delphi 2010... estimo que funcinoaria sin problemas en delphi 7.
Saludos
Nicolas Perichon
Elemento a modificar en Registro de windows:
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
SOFTWARE Microsoft Internet Explorer Main FeatureControl
FEATURE_BROWSER_EMULATION
contoso.exe = (DWORD) 000090000
info de Microsoft:
msdn.microsoft.com/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation
Código Delphi
[-]
procedure SetRegistryData(RootKey: HKEY; Key, Value: string;
RegDataType: TRegDataType; Data: variant);
var
Rergistro: TRegistry;
texto: string;
begin
Rergistro := TRegistry.Create(KEY_WRITE);
try
Rergistro.RootKey := RootKey;
if Rergistro.OpenKey(Key, True) then
begin
try
if RegDataType = rdUnknown then RegDataType := Rergistro.GetDataType(Value);
if RegDataType = rdString then
Rergistro.WriteString(Value, Data)
else if RegDataType = rdExpandString then
Rergistro.WriteExpandString(Value, Data)
else if RegDataType = rdInteger then
Rergistro.WriteInteger(Value, Data)
else if RegDataType = rdBinary then
begin
texto := Data;
Rergistro.WriteBinaryData(Value, PChar(texto)^, Length(texto));
end
else
raise Exception.Create(SysErrorMessage(ERROR_CANTWRITE));
except
Rergistro.CloseKey;
raise;
end;
Rergistro.CloseKey;
end
else
raise Exception.Create(SysErrorMessage(GetLastError));
finally
Rergistro.Free;
end;
end;
Ejemplo de codigo de llamada:
Código Delphi
[-]
SetRegistryData(HKEY_LOCAL_MACHINE,
'\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION',
'contoso.exe',rdBinary, 9999 );