ThinApp User’s Guide : Configuring Package Parameters : Configuring File Storage : VirtualDrives

VirtualDrives
The VirtualDrives parameter specifies additional drive letters that are available to the application at runtime.
ThinApp makes the virtual environment resemble the physical capture environment and mimics the physical drives that are available on the capture system. ThinApp represents virtual drives through the VirtualDrives parameter and a project folder, such as %drive_<drive_letter>%, that contains the virtual files on the drive. This project folder can reside in the read-only file system of the package and in the sandbox when write operations cannot occur on the physical drive.
The VirtualDrives parameter presents the drives to the application at runtime. The VirtualDrives parameter displays metadata about the drive, such as a the serial number and type of drive. For example, ThinApp detects the physical C: drive on the capture system and enters it into the parameter as a FIXED type of drive with the serial number.
The VirtualDrives parameter includes the following information:
Drive – Single character between A and Z.
Serial – 8 digit hex number.
Type – FIXED, REMOVABLE, CD-ROM, or RAMDISK.
FIXED – Indicates fixed media.
For example, a hard drive or internal Flash drive.
REMOVABLE – Indicates removable media.
For example, a disk drive, thumb drive, or flash card reader.
CD-ROM – Indicates a CD-ROM drive.
RAMDISK—Indicates a RAM disk.
Virtual drives are useful when applications rely on hard-coded paths to drive letters that might not be available on the deployment systems. For example, legacy applications might expect that the D: drive is a CD-ROM and that the data files are available at D:\media.
Virtual drive settings override the physical properties of the drive on the physical deployment system. If the VirtualDrives parameter defines a drive type as CD-ROM, and the physical drive is a hard disk, the application on the deployment system detects that drive as a CD-ROM drive.
Isolation Modes for Virtual Drives
Virtual drives are visible only to applications running in the virtual environment. Virtual drives do not affect the physical Windows environment. Virtual drives inherit isolation modes from the default isolation mode of the project unless you override the mode with a ##Attributes.ini file in the drive folder within the project directory.
If you copy files to the %drive_D% folder before building the application, you can use Full isolation mode for this drive. The application always reads from the virtual drive and does not try to read from any corresponding physical CD-ROM drive on the deployment system.
If you do not copy files to the %drive_D% folder before building the application, you can use Merged or WriteCopy isolation modes for virtual drive folders depending on whether you want to read from and write to the physical drive on the deployment system.
If you assign Merged isolation mode to your virtual drive, any write operations to that drive fail if that drive does not exist on the physical deployment system. ThinApp does not direct changes to the sandbox because Merged isolation mode instructs ThinApp to write to the physical drive. When the application cannot write to the physical drive as directed, the write operations fail.
The VirtualDrives parameter does not override isolation mode settings. A virtual application might not detect files on a physical drive because of isolation mode settings.
Modify Virtual Drive Isolation Modes
You might modify isolation modes for virtual drives when you want to override the default isolation mode of the project.
Modify virtual drive isolation modes
1
Add the %Drive_<letter>% directory to your ThinApp project.
2
Create a ##Attributes.ini file that includes an isolation mode entry for the drive letter.
[Isolation]
DirectoryIsolationMode=<isolation_mode>
3
Place the ##Attributes.ini file in the %Drive_<letter>% directory.
Examples
The VirtualDrives parameter is a single string that can hold information about multiple drive letters, and optional parameters for those drive letters. The parameter uses semicolons to separate information assigned to different drive letters and commas to separate parameters for individual drive letters. ThinApp assigns a serial number and the FIXED type to the drive.
[BuildOptions]
VirtualDrives= Drive=A, Serial=12345678, Type=REMOVABLE; Drive=B, Serial=9ABCDEF0, Type=FIXED
You can specify the X, D, and Z virtual drive letters.
[BuildOptions]
VirtualDrives=Drive=X, Serial=ff897828, Type=REMOVABLE; Drive=D, Type=CDROM; Drive=Z
Drive X is a removable disk with the ff797828 serial number.
Drive D is a CD-ROM drive with an assigned serial number.
Drive Z is a FIXED disk with an assigned serial number.