OverviewExamples
drive_type = Drive.GetType("C:\\");
Gets the type of drive given the drive letter "C:\" and stores the numeric result in a variable called "drive_type." Normally a value of 3 would be returned meaning their "C:" drive is a fixed drive.
what_type = Drive.GetType(_SourceDrive);
Determines what type of drive the update is run from and stores the result in what_type. If the user was running it from a CD-ROM or DVD-ROM drive, the variable what_type would contain the value 5.
Note: _SourceDrive is a built-in variable that contains the drive letter where the update.exe file is located.
-- Get the type of the drive where the update is running from.
drive_type = Drive.GetType(_SourceDrive);
-- If the drive type is a CD/DVD ROM drive, eject it.
if (drive_type == DRIVE_CDROM) then
Drive.Eject(_SourceDrive);
end
Determines what type of drive the update is run from and stores the result in drive_type. If the user is running it from a CD-ROM or DVD-ROM drive the drive would be ejected.
Note: _SourceDrive is a built-in variable that contains the drive letter where the update.exe file is located.
See also: Related Actions