Ver Mensaje Individual
  #2  
Antiguo 19-09-2007
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Reputación: 24
seoane Va por buen camino
Cita:
Empezado por Cecil Ver Mensaje
¿como puedo extraer el Nombre y la Organización a la que está registrado Windows?
Pues lo puede leer en el registro. En concreto los valores que buscan están el la clave "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\" y sus nombres son "RegisteredOwner" y "RegisteredOrganization"

Y antes de que preguntes aquí te dejo algo de código:
Código Delphi [-]
// Esta funcion lee una entrada del registro del tipo REG_SZ
function ReadRegString(Key: HKEY; Path, Name: String): String;
begin
  Result:= EmptyStr;
  with TRegistry.Create do
  try
    RootKey:= Key;
    Access:= KEY_READ;
    if OpenKey(Path,FALSE) then
    begin
      if ValueExists(Name) then
        Result:= ReadString(Name);
    end;
  finally
    Free;
  end;
end;

// Para mostrar el nombre del propietario
ShowMessage(ReadRegString(HKEY_LOCAL_MACHINE,
    '\Software\Microsoft\Windows NT\CurrentVersion\',
    'RegisteredOwner'));

// Y para mostrar el nombre de la organizacion
ShowMessage(ReadRegString(HKEY_LOCAL_MACHINE,
    '\Software\Microsoft\Windows NT\CurrentVersion\',
    'RegisteredOrganization'));
Responder Con Cita