🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #398

Re: How to create a Key in REGISTRY ???

#398
From: Dan Donoghue
Date: Sat, 22 May 1999 00:00
60 lines
2360 bytes
no such key exists for HKEY_CURRENTUSER in windows 95 or 98
you have to use HKEY_LOCALMACHINE

Regards,

Dan Donoghue
DSoft Computer Software

J.A. Korten wrote in message <7i6sct$1an$1@reader.wxs.nl>...
>
>Chow Hoi Ka, Eric heeft geschreven in bericht
><3746EEDC.1A12207A@sftw.umac.mo>...
>>Hello,
>>
>>1) How to get the Windows Path ???
>
>Question:How can I determine where the Windows directory is?Answer:
>You can make a call to the Windows API functionGetWindowsDirectory().
>If you want the system directory, simply call the Windows API function
>GetSystemDirectory().Example:{$IFNDEF WIN32} const MAX_PATH = 144;{$ENDIF}
>procedure TForm1.Button1Click(Sender: TObject);var
>  a : Array[0..MAX_PATH] of char;begin  GetWindowsDirectory(a, sizeof(a));
>  ShowMessage(StrPas(a));  GetSystemDirectory(a, sizeof(a));
>  ShowMessage(StrPas(a));end;
>>
>>2) How can I create a VALUE in REGISTRY ?
>
>Create a registry variable:
>
>use registry;
>
>var myreg : Tregistry
>
>myreg := tregistry.create;
>myreg.rootkey := HKEY_CURRENT_USER;
>myreg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Run', true);
>myreg.Writestring('testregistry');
>myreg.WriteInteger('12345');
>myreg.closekey;
>muyreg.free;
>
>Greetings Johan Korten
>
>
>>
>>Such as,
>>
>>I want to put this value into
>>\HKKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run :
>>
>>String ="TestRegistry"
>>Value=12345
>>
>>
>>Best regards,
>>Eric
>>
>>
>
>
Technical Details
Message-ID: <XnD13.3711$z4.30494@nnrp3.clara.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3746EEDC.1A12207A@sftw.umac.mo> <7i6sct$1an$1@reader.wxs.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fd817,c46fe20f3e9c5522
X-Google-Attributes: gidfd817,public
X-Google-Thread: 10baee,c46fe20f3e9c5522
X-Google-Attributes: gid10baee,public
X-Google-Thread: 1043cf,c46fe20f3e9c5522
X-Google-Attributes: gid1043cf,public
From: "Dan Donoghue" <dan.d@clara.net>
Subject: Re: How to create a Key in REGISTRY ???
Date: 1999/05/22
Message-ID: <XnD13.3711$z4.30494@nnrp3.clara.net>
X-Deja-AN: 480961008
References: <3746EEDC.1A12207A@sftw.umac.mo> <7i6sct$1an$1@reader.wxs.nl>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
X-Complaints-To: abuse@clara.net
X-Trace: nnrp3.clara.net 927400567 195.8.89.95 (Sat, 22 May 1999 20:16:07 BST)
NNTP-Posting-Date: Sat, 22 May 1999 20:16:07 BST
Newsgroups: comp.lang.pascal.delphi.misc,alt.comp.lang.borland-delphi,borland.public.delphi.objectpascal