- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
// Check if You need Administrator-level access to create a folder
try
mkdir(SDirectory + '\~TEST');
except
on E: exception do
begin
if E.message = 'File access denied' then
begin
MessageBox(self.Handle,
'You need Administrator-level access to create this folder', '', MB_ICONERROR);
exit;
end;
end;
end;
RmDir(SDirectory + '\~TEST');