How do I map a drive?

CrossOver allows you to add new drives to be used by Windows applications, and to change their label or serial number. If you
need to create a new drive or have an application which depends on a serial number or Windows volume label then follow the
examples below.

For example to make the path /mnt'' available as the drive ''J: in a bottle, you would execute the following command:

$ ln -s /mnt "~/.cxoffice/bottle-name/dosdevices/j:"

To associate this drive to the /dev/sda1 device you would add a double colon to the command.

$ ln -s /dev/sda1 "~/.cxoffice/bottle-name/dosdevices/j::"

For ’real’ devices, CrossOver should automatically get the serial number and label for a volume. However you can also set these
manually. To set the serial number of a given mount point you need to create a file called .windows-serial on the root of
the virtual drive.

$ echo ’12345678’ >/mnt/.windows-serial

To set the label you would create a file called .windows-label on the root of the virtual drive.

$ echo ’MY_LABEL’ >/mnt/.windows-label

If you need to be able to access a UNC path in an application you can add an entry for the paths to your CrossOver configuration. Please note that browsing and dynamically adding UNC paths are not supported at this time.

Windows shares or UNC paths can be mapped into the ~/.cxoffice/bottlename/dosdevices/unc/ directory so anything trying to access \myserver\share\file will look in ~/.wine/dosdevices/unc/myserver/share/file. For example, if you used Samba to mount \myserver\share on /mnt/smb/myserver/share then you can do

$ ln -s /mnt/smb/myserver/share "~/.cxoffice/bottlename/dosdevices/unc/myserver/share

Now any windows application trying to read \myserver\share\file should be able to access it assuming there is no problem with file locks not being properly passed to the server. If you run in to problems, please file a support ticket.

Last modified on 2021-03-02 15:45:14 by Jeremy Newman
Are you sure you want to delete this page?
Note: Any nested pages that are under this one will be moved up one level. Any attachments tied to this page will be deleted.
Move / Rename Page
Unknown Error, unable to move!
That page exists already!
One or more of the parent pages specified in new path do not exist!
/support/wiki/ /support/wiki/linux/faq/cxoffice62_howtomapadrive
CodeWeavers or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in our Privacy Policy. You accept the use of cookies or other identifiers by clicking the Acknowledge button.
Please Wait...