# Sys_GetDriveType

> Detects type of specified drive.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/system-functions/sys-getdrivetype/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Detects type of specified drive

### Syntax

Sys_GetDriveType(sDriveLetter, bMustExist) As Boolean

### Parameters

#### sDriveLetter (String)

Drive letter

#### bMustExist (Boolean)

Drive must exist

### Return value

Result will be stored in gsValue. Possible values: 'Unknown', 'Removable', 'Fixed', 'Network', 'CD-ROM', 'RAM Disk'

### Example

**VBScript**

```vb
If bStatus Then bStatus = Sys_GetDriveType("D", True)
If bStatus Then bStatus = Job_Writelog("Custom", "gsValue: " & gsValue, True)
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[Sys_GetFreeDiskSpace](/capainstaller/vb-scripting-library/system-functions/sys-getfreediskspace/) [Sys_GetFileSystemType](/capainstaller/vb-scripting-library/system-functions/sys-getfilesystemtype/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
