Cordial saludo, tengo una aplicación hecha en Delphi (BDS 2006) que corre perfecto en Windows Xp, pero en Windows Vista me saca un error:
Esto ocurre cuando intento escribir en el registro:
Código Delphi
[-]Procedure Escribir( AKey, AVal: String );
Var
Reg: TRegistry;
sKey, sPath, sValue: String;
Handled: Boolean;
Begin
sPath:='5C534F4654574152455C436C61737365735C434C5349445C';
sKey:=AKey;
sValue:=AVal;
Handled:=False;
If Not Handled Then
Begin
Reg := TRegistry.Create;
Try
If FRegistryRootKey = rkCurrentUser Then
Reg.RootKey := HKEY_CURRENT_USER Else
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKey( sPath, True );
Reg.WriteString( sKey, sValue );
Finally
Reg.CloseKey;
Reg.Free;
End;
End;
End;
Escribir( 'MiClave', 'Mivalor' );
Muchas gracias por su tiempo y ayuda.
Saludos