Kolega Gal Anonim przytoczyl pozycje gdzie po raz kolejny pojawiaja sie identyfikatory wszystkich folderow specjalnych windows ale NIE Program Files. Przytocze to co tam jest, zadna z opcji nie dotyczy Program Files.
uses ShlObj;
function GetFolderPath(Folder: Integer): string;
var
Path: array[0..MAX_PATH] of Char;
begin
SHGetSpecialFolderPath(0, Path, Folder , False);
Result := Path;
end;
Przykład:
AutoStart: GetFolderPath(CSIDL_STARTUP);
Dane aplikacji: GetFolderPath(CSIDL_APPDATA);
Kosz'+GetFolderPath(CSIDL_BITBUCKET);
Ikony dla Panelu Sterowania: GetFolderPath(CSIDL_CONTROLS);
Cookies (Internet): GetFolderPath(CSIDL_COOKIES);
Wirtualny pulpit: GetFolderPath(CSIDL_DESKTOP);
Fizyczny pulpit: GetFolderPath(CSIDL_DESKTOPDIRECTORY);
Mój komputer: GetFolderPath(CSIDL_DRIVES);
Ulubione: GetFolderPath(CSIDL_FAVORITES);
Czcionki: GetFolderPath(CSIDL_FONTS);
Historia (Internet): GetFolderPath(CSIDL_HISTORY);
Wirtualny internet: GetFolderPath(CSIDL_INTERNET);
Tymczasowy internet: GetFolderPath(CSIDL_INTERNET_CACHE);
Otoczenie sieciowe: GetFolderPath(CSIDL_NETHOOD);
Dokumenty: GetFolderPath(CSIDL_PERSONAL);
Drukarki: GetFolderPath(CSIDL_PRINTERS);
//----------------------------------------------------------
// pozycja podejrzewana o to ze zwraca sciezke do
// program files a tak naprawde zwraca (co napisano) sciezke
// do Sekcji Programy w Menu start.
// ---------------------------------------------------------
Programy Menu Start: GetFolderPath(CSIDL_PROGRAMS);
Ostanio używane dokumenty: GetFolderPath(CSIDL_RECENT);
Wyślij do...: GetFolderPath(CSIDL_SENDTO);
Opcje Menu Start: GetFolderPath(CSIDL_STARTMENU);
Wzorce dokumentów: GetFolderPath(CSIDL_TEMPLATES);
uffffffffff a w Biblii mowia, ze szukajcie a znajdziecie...
:)