- sh4d0w: Árnyékos sarok
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- ldave: New Game Blitz - 2025
- hdanesz: Elektromos autózás - első élmények
- Ivqkzy-: 2. gépem
- droidic: EA GAMES – élő emberrel a supportban 2025 ben
- Luck Dragon: Asszociációs játék. :)
- sziku69: Fűzzük össze a szavakat :)
- eBay-es kütyük kis pénzért
- Ivqkzy-: Eddig
Ú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
Hirdetés
- GAMER PC : RYZEN 5 4500 / 16GB DDR4 / ASUS RX 480 8GB / WiFi / Bluetooth / 512GB M.2 SSD / 500GB HDD
- Dell Latitude 7390, 13,3" FHD IPS , I5-7300U CPU, 16GB DDR4, 512GB SSD, WIN 11, ( olvasd végig )
- Acer PREDATOR HELIOS NEO 16 / i9-14900HX / RTX 4070 (140W) / 1 TB SSD / 240HZ
- Topping A70 Pro fejhallgató erősítő
- Topping D70 Pro Octo DAC
- DELL PowerEdge R640 rack szerver - 1xGold 6138 (20c/40t, 2.0/3.7GHz), 64GB RAM,4x1G RJ, HBA330, áfás
- ÁRGARANCIA! Épített KomPhone Ryzen 7 7800X3D 32/64GB RAM RTX 5090 32GB GAMER PC termékbeszámítással
- Xiaomi Redmi 10 128GB, Kártyafüggetlen, 1 Év Garanciával
- Eladó ÚJ, BONTATLAN Samsung Galaxy A05s 4/64GB ezüst / 12 hónap jótállással!
- Samsung Galaxy A12 64GB, Kártyafüggetlen, 1 Év Garanciával
Állásajánlatok
Cég: Promenade Publishing House Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest