Hirdetés
- iOS alkalmazások
- Ezek a OnePlus 12 és 12R európai árai
- Apple iPhone 17 Pro Max – fennsík
- iPhone topik
- Milyen okostelefont vegyek?
- Honor Magic6 Pro - kör közepén számok
- Vivo X300 - kicsiben jobban megéri
- Örömkönnyek és üres kezek a TriFold startjánál
- Xiaomi 14T Pro - teljes a család?
- Megbüntették, ezért feloszlatná az EU-t Elon Musk
Ú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
- ÁRGARANCIA!Épített KomPhone i5 12400F 16/32/64GB RAM RTX 5060 Ti 16GB GAMER PC termékbeszámítással
- Honor Magic 7 Pro 512 Gb - AI Pro kamera, 6,8 120 Hz LTPO OLED, Snapdragon 8 Elite,3 hó gari!
- AKCIÓ! Acer KG251QF 24 144Hz FHD TN 1ms monitor garanciával hibátlan működéssel
- HIBÁTLAN iPhone 12 Pro Max 128GB Pacific Blue -1 ÉV GARANCIA - Kártyafüggetlen, 100% Akksi, MS4011
- Lenovo ThinkPad P15 Gen 2 Intel i7-11850H 32GB 512GB Nvidia RTX A4000 1 év garancia
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: ATW Internet Kft.
Város: Budapest


