Вниз
Скачать: CL | DM;

Добавление и удаление ключа на автозапуск   Найти похожие ветки 

 
Term ©   (2005-08-02 10:51) [0]

Блин не отсылайте никуда, я всё смотрел но error найти не могу, значение в реест добавляю а удалить не могу

поправте:

h := TRegistry.Create;
if Form1.CheckBox1.Checked then
       begin
       h.RootKey := HKEY_LOCAL_MACHINE;
       h.OpenKey("\Software\Microsoft\Windows\CurrentVersion\Run", true);
       h.WriteString("Eshelon", Application.ExeName);
       h.CloseKey;
       h.Free;
       end;

if not Form1.CheckBox1.Checked then
       begin
       h.RootKey := HKEY_LOCAL_MACHINE;
       h.OpenKey("\Software\Microsoft\Windows\CurrentVersion\Run\Eshelon", true);
       if h.DeleteKey("\Software\Microsoft\Windows\CurrentVersion\Run\Eshelon") then showmessage("");
       h.CloseKey;
       h.Free;
       end;


h.DeleteKey возвращает true но ничего не удаляется


 
Term ©   (2005-08-02 11:04) [1]

есть кто живой


 
tormoz   (2005-08-02 11:07) [2]

h.OpenKey("\Software\Microsoft\Windows\CurrentVersion\Run",false);


 
tesseract ©   (2005-08-02 11:09) [3]

не DeleteKey а DeleteValue


 
Term ©   (2005-08-02 11:13) [4]

спасибо получилось



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: -0.852 c
11-1105547544
Seeker
2005-01-12 19:32
2005.08.21
KOLScktComp


1-1123021095
АскЮ
2005-08-03 02:18
2005.08.21
Как правильно расчленить большой проект на классы и модули ?


14-1122742383
TStas
2005-07-30 20:53
2005.08.21
Сколько же лет Вирт паскаль писал?


1-1123077939
Vitali
2005-08-03 18:05
2005.08.21
Временное зависание Delphi


4-1119772697
Storm
2005-06-26 11:58
2005.08.21
Перехват обращения к файлу или папке




   Наверх