- Milyen videókártyát?
- Azonnali alaplapos kérdések órája
- Milyen TV-t vegyek?
- Apple MacBook
- Gigabyte alaplap topik
- TCL LCD és LED TV-k
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- Kompakt AIO-val használható rackmount ház jött a Chieftec fémjelzésével
- Házi barkács, gányolás, tákolás, megdöbbentő gépek!
- GeForce RTX 5060: Ezt kapjuk 150 ezerért
Ú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
- AliExpress tapasztalatok
- Okosóra és okoskiegészítő topik
- Egyéves Gemini AI Pro a Google-től a magyar egyetemistáknak is
- Milyen videókártyát?
- Magga: PLEX: multimédia az egész lakásban
- Kodi és kiegészítői magyar nyelvű online tartalmakhoz (Linux, Windows)
- Xbox Series X|S
- Poco F7 – bajnokesélyes
- droidic: Windows 11 önállóság nélküli világ: a kontroll új korszaka
- Azonnali alaplapos kérdések órája
- További aktív témák...
- ÁRGARANCIA!Épített KomPhone i5 10400F 16/32/64GB RAM RX 7600 8GB GAMER PC termékbeszámítással
- Microsoft licencek KIVÉTELES ÁRON AZONNAL - UTALÁSSAL IS AUTOMATIKUS KÉZBESÍTÉS - Windows és Office
- HIBÁTLAN iPhone 13 256GB Pink -1 ÉV GARANCIA - Kártyafüggetlen, MS3732, 91% Akkumulátor
- Független, karcmentes Xiaomi Redmi Note 10 Pro 6GB RAM / 128GB / Onyx Grey
- Vadiúj AM5 procik! Több darab kèszleten! Kamatmentes rèszletre is!
Állásajánlatok
Cég: NetGo.hu Kft.
Város: Gödöllő
Cég: Laptopműhely Bt.
Város: Budapest



