Name
VMEnableSharedFolders
Description
$err = VMEnableSharedFolders($vmHandle,
$enabled,
$options);
This function enables or disables all shared folders as a feature for a virtual
machine.
Parameters
- vmHandle
-
Identifies a virtual machine. Call VMOpen() to create a virtual machine handle.
- enabled
-
TRUE if enabling shared folders is desired. FALSE otherwise.
- options
-
Must be 0.
Return Value
$err. The error code returned by the operation. For returned values, see Topics > Error Codes.
Remarks
- This function enables/disables all shared folders as a feature on a virtual
machine. In order to access shared folders on a guest, the feature has to be
enabled, and in addition, the individual shared folder has to be enabled.
- It is not necessary to call VMLoginInGuest() before calling this function.
- In this release, this function requires the virtual machine to be powered on
with VMware Tools installed.
- Shared folders are not supported for the following guest operating systems:
Windows ME, Windows 98, Windows 95, Windows 3.x, and DOS.
Side Effects
- On Linux virtual machines, calling this function will automatically mount
shared folder(s) in the guest.
Requirements
use VMware::Vix::Simple;
use VMware::Vix::API::Constants;
since VMware Workstation 6.0
Minimum Supported Guest OS: Microsoft Windows NT Series, Linux
Example
my $err;
$err = VMEnableSharedFolders($vmHandle, 1, 0);