Link to home
Start Free TrialLog in
Avatar of nod31
nod31

asked on

registered organisation

how can i change the registered user using an editbox to enter the user and a button?


nod31
ASKER CERTIFIED SOLUTION
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sorry there's no need for variable S
just remove this line :
  S:  string ;

:o)
Avatar of rondi
rondi

On NT and 2000 the key will be
\SOFTWARE\Microsoft\Windows NT\CurrentVersion

so

function SetWinRegInfo(const Owner, Organization: string): boolean;
begin
  result := false;
  with TRegistry.Create do
  try
    LazyWrite := false;
    RootKey := HKEY_LOCAL_MACHINE;
    if OpenKey('\SOFTWARE\Microsoft\Windows NT\CurrentVersion',False) or OpenKey('\SOFTWARE\Microsoft\Windows\CurrentVersion',False) then
    begin
      WriteString('RegisteredOwner',Owner);
      WriteString('RegisteredOrganization',Organization);
      result := true;
    end;
  finally
    Free;
  end;
end;