![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Добавление и удаление ключа на автозапуск [D6, Win2k]
Term © (2005-08-02 10:51:00)Блин не отсылайте никуда, я всё смотрел но 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:13:00) [1]спасибо получилось
tesseract (2005-08-02 11:09:00) [2]не DeleteKey а DeleteValue
tormoz (2005-08-02 11:07:00) [3]
h.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Run',false);
Term (2005-08-02 11:04:00) [4]есть кто живой