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

Как это должно работать!?   Найти похожие ветки 

← →
Wood   (2006-03-27 06:15) [0]

Помогите, плз.
Создал приложение, выполняющее всего одну лишь функцию, при нажатии кнопки:

If not SetEnvironmentVariable(Pchar("Kool"),Pchar("C:\MyKool")) then
ShowMessage("Error");


По идее, должна создаться такая переменная? Не получается, ни до, ни после перезагрузки программы, системы :(
Нужно, что б эта переменная появилась в системе "Переменные среды" -> "Системные переменные".
Спасибо.


← →
Dmitrij_K   (2006-03-27 08:13) [1]

Calling SetEnvironmentVariable has no effect on the system environment variables. The user can add or modify system environment variables using the Control Panel. To programmatically add or modify system environment variables, add them to the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment registry key, then broadcast a WM_SETTINGCHANGE message. This allows applications, such as the shell, to pick up your updates. Note that environment variables listed in this key are limited to 1024 characters.


← →
Wood   (2006-03-27 11:37) [2]

значит ч/з реестр, я думал, это последний вариант, а он оказался единственный.
спасибо



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

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



Память: 0.45 MB
Время: 0.025 c
2-1143172232
PIA
2006-03-24 06:50
2006.04.09
Обработка визуальных компонентов


2-1143368562
Mahab
2006-03-26 14:22
2006.04.09
Image


2-1143185634
Lera
2006-03-24 10:33
2006.04.09
другое приложение


4-1137749947
not_dev
2006-01-20 12:39
2006.04.09
Контроль компонентов


2-1143536503
Revan
2006-03-28 13:01
2006.04.09
Массивы




   Наверх