Get the desktop path with the registry.

xiaoxiao2021-03-06  67

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;

转载请注明原文地址:https://www.9cbs.com/read-88194.html

New Post(0)