nod31
asked on
registered organisation
how can i change the registered user using an editbox to enter the user and a button?
nod31
nod31
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
On NT and 2000 the key will be
\SOFTWARE\Microsoft\Window s 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\Microso ft\Windows NT\CurrentVersion',False) or OpenKey('\SOFTWARE\Microso ft\Windows \CurrentVe rsion',Fal se) then
begin
WriteString('RegisteredOwn er',Owner) ;
WriteString('RegisteredOrg anization' ,Organizat ion);
result := true;
end;
finally
Free;
end;
end;
\SOFTWARE\Microsoft\Window
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\Microso
begin
WriteString('RegisteredOwn
WriteString('RegisteredOrg
result := true;
end;
finally
Free;
end;
end;
just remove this line :
S: string ;
:o)