Cita:
Empezado por Cecil
¿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
[-]
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;
ShowMessage(ReadRegString(HKEY_LOCAL_MACHINE,
'\Software\Microsoft\Windows NT\CurrentVersion\',
'RegisteredOwner'));
ShowMessage(ReadRegString(HKEY_LOCAL_MACHINE,
'\Software\Microsoft\Windows NT\CurrentVersion\',
'RegisteredOrganization'));