Thread View: comp.lang.pascal.delphi.misc
3 messages
3 total messages
Started by Chow Hoi Ka, Eric
Sun, 23 May 1999 00:00
How to create a Key in REGISTRY ???
Author: Chow Hoi Ka, Eric
Date: Sun, 23 May 1999 00:00
Date: Sun, 23 May 1999 00:00
17 lines
1192 bytes
1192 bytes
Hello, 1) How to get the Windows Path ??? 2) How can I create a VALUE in REGISTRY ? Such as, I want to put this value into \HKKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run : String ="TestRegistry" Value=12345 Best regards, Eric
Re: How to create a Key in REGISTRY ???
Author: J.A. Korten
Date: Sat, 22 May 1999 00:00
Date: Sat, 22 May 1999 00:00
49 lines
2119 bytes
2119 bytes
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
>
>
Re: How to create a Key in REGISTRY ???
Author: Dan Donoghue
Date: Sat, 22 May 1999 00:00
Date: Sat, 22 May 1999 00:00
60 lines
2360 bytes
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
>>
>>
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads