function GetDesktopDir: String; var R: TRegistry; begin R: = TRegistry.Create; R.OpenKey ( 'SOFTWARE / MICROSOFT / WINDOWS / CURRENTVERSION / EXPLORER / SHELL FOLDERS', FALSE); Result: = R.ReadString ( 'DESKTOP' ); Result: = Uppercase (Result); // Convert to case, may not be used; R.Free; end; // The string returned by the function is the path;