Вниз
Скачать: 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-1143004367
Rubey
2006-03-22 08:12
2006.04.09
Вывод текста на экран


1-1141461972
Kristmas
2006-03-04 11:46
2006.04.09
DragDrop в Virtual VistView


2-1143100184
Bool
2006-03-23 10:49
2006.04.09
FormKeyDown


2-1143444504
KyRo
2006-03-27 11:28
2006.04.09
OpenDialog


2-1142870727
Asmadei
2006-03-20 19:05
2006.04.09
послать на rs232 17kb данных




   Наверх