Вниз
Скачать: 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.028 c
2-1143039573
Boris Marchenko
2006-03-22 17:59
2006.04.09
Перестановки


15-1142962553
Dust
2006-03-21 20:35
2006.04.09
Диалог выбора паки


6-1134206389
Norlin
2005-12-10 12:19
2006.04.09
ПРостой Firewall


2-1143534359
Barksy
2006-03-28 12:25
2006.04.09
Какую клиент-серверную базу выбрать?


4-1138077362
Atheist
2006-01-24 07:36
2006.04.09
Нестандартный edit (получение текста)




   Наверх