function Laufwerke: string;
var
x: Byte;
d: DWord;
begin
result := '';
d := GetLogicalDrives;
for x := 0 to 31 do begin
if odd(d) then
result := result + chr(x + 65) + #32;
d := d shr 1;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(Laufwerke);
end;