Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > API de Windows
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

 
 
Herramientas Buscar en Tema Desplegado
  #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
Poder: 26
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
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Extraer nombre de unidad en tiempo de ejecución. Delphius Varios 2 21-04-2007 05:57:23
Extraer solo el nombre de un archivo sin su extencion coyule API de Windows 2 13-01-2007 04:12:01
extraer nombre y tipo de campo cuscus Firebird e Interbase 10 03-11-2006 18:17:08
Extraer el nombre del mes de una fecha JODELSA Varios 4 19-05-2005 23:29:41
Extraer el nombre de una imagen acrophet Gráficos 5 08-07-2004 16:12:27


La franja horaria es GMT +2. Ahora son las 22:26:46.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi