Check this out Vacunita,
This procdure gets the
desktop directory, the
my documents directoryp, and the
favorites directory.
procedure TForm1.Button1Click(Sender: TObject);
const
RunKey = '.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders';
var
Registry: TRegistry;
MyDocsDir, DeskTopDir, FavsDir: String;
begin
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_USERS;
if Registry.OpenKey(RunKey, FALSE) then
begin
MyDocsDir := Registry.ReadString('Personal');
DeskTopDir := Registry.ReadString('Desktop');
FavsDir := Registry.ReadString('Favorites');
end
finally
Registry.Free;
ComboBox1.Items.Add(MyDocsDir); // Example useage
ComboBox1.Items.Add(DeskTopDir); // Example useage
ComboBox1.Items.Add(FavsDir); // Example useage
end;
end;
Everyone has a right to my opinion.
E-mail me at
cwcon@programmer.net