Diretório do Windows

Delphi

14/09/2003

Por gentileza, alguém conhece uma função que retorne o caminho onde o windows foi instalado?:shock:
Obrigado!!!


Vanduarte

Vanduarte

Curtidas 0

Respostas

Adilsond

Adilsond

14/09/2003

function GetTempDir: String;
var
  TempDir: array[0..255] of Char;
begin
  GetTempPath(255, @TempDir);
  Result := StrPas(TempDir);
end;

function GetWindowsDir: String;
var
  WinDir: array[0..255] of Char;
begin
  GetWindowsDirectory(@WinDir, 255);
  Result := StrPas(WinDir) + ´\´;
end;



GOSTEI 0
Vanduarte

Vanduarte

14/09/2003

Pensei que no próprio Delphi tivesse uma função específica para isso!
Mas, mesmo assim, Muito Obrigado Adilson!!
Valeu!!!


GOSTEI 0
Bacalhau

Bacalhau

14/09/2003

AAAAAAAAAAARRRRRGHHH! :shock:

Até que enfim, encontrei a maldita solução!!

Obrigado AdilsonD. Essa valeu também para mim!!


GOSTEI 0
POSTAR