EnableSharedFolders([in] VARIANT_BOOL enabled,
[in] LONG options,
[in] ICallback* jobDoneCallback,
[out,retval] IJob** enableJob);
This function enables or disables all shared folders as a feature for a virtual
Pass true if enabling shared folders is desired. Pass false otherwise.
Must be 0.
An ICallback instance that will be called when the
operation is complete.
Returns an IJob object that describes the state of this asynchronous operation.
- 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 VM::LoginInGuest() 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.
- On Linux virtual machines, calling this function will automatically mount
shared folder(s) in the guest.
VixCOM.h, since VMware Workstation 6.0
Minimum Supported Guest OS: Microsoft Windows NT Series, Linux
' Turn shared folders on.
Set job = vm.EnableSharedFolders(true, 0, Nothing)
err = job.WaitWithoutResults()
If lib.ErrorIndicatesFailure(err) Then
WScript.Echo("Error: " & lib.GetErrorText(err, empty))
Set job = Nothing