Reputation: 487
I need to know if a specific drive exists.
My application will install in two different drives, for example: drive F and G
[Setup]
DefaultDirName=F:\Test\
[Dirs]
Name: G:\Test\storage;
If drive F does not exists Inno Setup show a message about it. But if drive G does not exist the installer stops working.
Upvotes: 0
Views: 856
Reputation: 202292
Use DirExists
function:
function InitializeSetup(): Boolean;
begin
while not DirExists('F:\') do
begin
MsgBox('Connect F:\ drive.', mbInformation, MB_OK);
end;
Result := True;
end;
Upvotes: 2