Archive: How to Confirm a Disk exist£¿ such as D:


How to Confirm a Disk exist£¿ such as D:
How to Confirm a Disk exist£¿ such as D:
I create a installer, $INSTDIR set D:\netvoice, but I want to check if there is a disk of D: in target computer?


To Check if drive d:\ exists use this command:


IfFileExists D:\*.* DriveOK DriveNotOK

DriveOK
#Code if drive exists
goto DriveCheckEnd

DriveNotOK:
#Code if drive not exists
goto DriveCheckEnd

DriveCheckEnd:

This should fix your problem.

Vytautas