- Milyen belső merevlemezt vegyek?
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- Asztrofotózás
- Milyen alaplapot vegyek?
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- OLED TV topic
- NVIDIA GeForce RTX 5070 / 5070 Ti (GB205 / 203)
- E-book olvasók
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- Épített vízhűtés (nem kompakt) topic
Új hozzászólás Aktív témák
-
pIIrash
tag
unit un_RMethods;
interface
uses Windows, SysUtils, Registry;
const
CurVer = 'SOFTWARE\Microsoft\Windows\CurrentVersion\';
R_UninstPrg = CurVer + 'Uninstall';
R_RUN = CurVer + 'Run';
procedure SetStartWithWindows(AppName, AppTitle: string);
procedure SetRegistryValue(RootKey: HKEY; Key, KeyName, Value, regType: string);
implementation
procedure SetRegistryValue(RootKey: HKEY; Key, KeyName, Value, regType: string);
var
Registry: TRegistry;
begin
Registry := TRegistry.Create;
with Registry do
begin
try
RootKey := RootKey;
if OpenKey(Key, False) then
begin
if regType = 'STR' then WriteString(KeyName, Value);
if regType = 'BOL' then WriteBool(KeyName, StrToBool(Value));
if regType = 'INT' then WriteInteger(KeyName, StrToInt(Value));
end;
finally
Free;
end;
end;
end;
function GetRegistryValue(RootKey: HKEY; Key, Value, regType: string): string;
var
Registry: TRegistry;
TempValue: string;
begin
Registry := TRegistry.Create;
with Registry do
begin
try
RootKey := RootKey;
if OpenKey(Key, False) then
begin
if regType = 'STR' then TempValue := Registry.ReadString(Value);
if regType = 'BOL' then TempValue := BoolToStr(ReadBool(Value));
if regType = 'INT' then TempValue := IntToStr(ReadInteger(Value));
end;
finally
Free;
end;
end;
Result := TempValue;
end;
pl: beírás:
procedure SetStartWithWindows(AppName, AppTitle: string);
begin
SetRegistryValue(HKEY_LOCAL_MACHINE, R_RUN, <Program elérési útja>, <Program neve>, 'STR');
end;
pl: kiolvasás:
InstallPath := GetRegistryValue(HKEY_LOCAL_MACHINE, SOFTWARE\<A program neve>\, A kulcs amiből olvasni akarsz);
Remélem segít!
[Szerkesztve]
Új hozzászólás Aktív témák
- Gitáros topic
- Motorolaj, hajtóműolaj, hűtőfolyadék, adalékok és szűrők topikja
- Yutani: Yutani Retró Hangkártyái: OAK Mozart Wavetable
- Kodi és kiegészítői magyar nyelvű online tartalmakhoz (Linux, Windows)
- Call of Duty: Black Ops 6
- Milyen belső merevlemezt vegyek?
- Samsung Galaxy Note10 és Note10+ duplateszt
- BestBuy topik
- PlayStation 4
- EAFC 25
- További aktív témák...
- Gamer PC - Ryzen 7 5700X / RTX 5060 / A520M / 16GB vagy 32GB RAM / 240GB + 1TB SSD / 650W
- Kingston FURY Beast 64GB (2x32GB) DDR4 3200MHz KF432C16BB/32
- iPhone 13 Midnight -128gb-90% akku- 2026.10. garancia
- Újszerű Asus Vivobook S 15 S5507 -15,7 2.8K OLED X Elite X1E - 32GB DDR5 - 1TB - Win11 - 1 év gari
- Szép! DELL PRECISION 7740 Tervező Vágó Laptop -60% 17,3" XEON E-2286M 32/1TB RTX 5000 16GB! UHD 4K
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Promenade Publishing House Kft.
Város: Budapest