Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.02.20;
Скачать: CL | DM;

Вниз

Директория Windows   Найти похожие ветки 

 
Stype ©   (2005-02-08 17:23) [0]

Как узнать директорию, где установленна Windows ?


 
palva ©   (2005-02-08 18:48) [1]

{$APPTYPE CONSOLE}
uses windows;
var s: String;
begin
 SetLength(s, 250);
 SetLength(s, GetWindowsDirectory(PChar(s), 250));
 writeln(s);
end.


 
VMcL ©   (2005-02-08 19:01) [2]

>>palva ©   (08.02.05 18:48) [1]

Только не 250, а MAX_PATH.


 
palva ©   (2005-02-08 19:07) [3]

OK


 
palva ©   (2005-02-08 19:12) [4]

Можно даже так:
{$APPTYPE CONSOLE}
uses windows;
var s: String;
begin
 SetLength(s, GetWindowsDirectory(PChar(s), 0));
 GetWindowsDirectory(PChar(s), Length(s));
 writeln(s);
end.


 
rdm ©   (2005-02-08 22:22) [5]

Caption := SysUtils.GetEnvironmentVariable("windir");


 
VMcL ©   (2005-02-08 22:51) [6]

>>rdm ©   (08.02.05 22:22) [5]

Так делать не следует. Переменную окружения можно изменить.


 
Piter ©   (2005-02-08 23:29) [7]

Директория с Windows это - %SystemRoot%


 
VMcL ©   (2005-02-09 01:02) [8]

>>Piter ©   (08.02.05 23:29) [7]

В Win9x нет SystemRoot, есть только windir, AFAIR.


 
Fay ©   (2005-02-09 03:38) [9]

2 VMcL ©   (08.02.05 19:01) [2]
uSize
[in] Specifies the maximum size, in TCHARs, of the buffer specified by the lpBuffer parameter. This value should be set to MAX_PATH+1 to allow sufficient space for the path and the null terminator.


 
Fay ©   (2005-02-09 03:39) [10]

2 Piter ©   (08.02.05 23:29) [7]
Директория с Windows - это GetWindowsDirectory



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

Текущий архив: 2005.02.20;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.052 c
14-1106753737
olookin
2005-01-26 18:35
2005.02.20
Не подскажете ли, что такое muxbox?


10-1082101998
pirat
2004-04-16 11:53
2005.02.20
интерфейсы Explorer


1-1107704675
Gear99
2005-02-06 18:44
2005.02.20
Как создать одно всплывающее окно из другого?


1-1107449489
Muhan
2005-02-03 19:51
2005.02.20
Как проверить существует ли файл?


8-1099345742
dredd
2004-11-02 00:49
2005.02.20
Вопрос по математике