Вниз
Скачать: 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.042 c
1-1141964660
anton773
2006-03-10 07:24
2006.04.09
Делфи тормозит


2-1143393140
Bogdan1024
2006-03-26 21:12
2006.04.09
Неудобная TChart


3-1139836939
maximmsm
2006-02-13 16:22
2006.04.09
При попытке подключиться к удалённой базе EIBInterBaseError


15-1142943046
Knight
2006-03-21 15:10
2006.04.09
Кто-нибудь со СКИФ3 знаком?


15-1142502725
Esu
2006-03-16 12:52
2006.04.09
ICQ проблемы




   Наверх