Hirdetés
- Milyen lézer nyomtatót vegyek?
- Milyen billentyűzetet vegyek?
- A Cherry többé nem gyárt kapcsolókat
- Milyen házat vegyek?
- Drágul a Raspberry Pi, de lesz egy új, olcsó verzió
- ZIDOO médialejátszók
- AMD Navi Radeon™ RX 9xxx sorozat
- Rémisztő árakkal szembesülnek a notebookgyártók az új mobil platformoknál
- Milyen videókártyát?
- Kormányok / autós szimulátorok topikja
Ú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
- Kerékpárosok, bringások ide!
- Path of Exile (ARPG)
- One mobilszolgáltatások
- Milyen lézer nyomtatót vegyek?
- Béta iOS-t használók topikja
- Mibe tegyem a megtakarításaimat?
- Interactive Brokers társalgó
- exHWSW - Értünk mindenhez IS
- Milyen billentyűzetet vegyek?
- Direct One (műholdas és online TV)
- További aktív témák...
- Macbook Pro 16" - 2020 gyártás, 6 mag i7, 16/512GB, Radeon 4GB, touchbar - garancia (6766)
- MacBook Air M3 256GB SSD space gray asztroszürke Apple magyar 2 év AppleCare garancia
- Google bontatlan Pixel 10 Pro XL 16/256GB Obsidian 2027.11.04-ig Garis
- DJI Osmo Action Akciókamera és Kiterjedt Tartozékszett Eladó
- Samsung Galaxy Z Fold 7 Kék, 512 GB, 100% akku, megkímélt állapot, garanciával
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: ATW Internet Kft.
Város: Budapest


