共用方式為


IVMVirtualServer::VMScriptsEnabled property

The VMScriptsEnabled property contains VARIANT_TRUE if scripts attached to any virtual machine are allowed to run.

This property is read/write.

Syntax

HRESULT put_VMScriptsEnabled(
  [in]  VARIANT_BOOL shouldEnable
);

HRESULT get_VMScriptsEnabled(
  [out] VARIANT_BOOL *isEnabled
);

VB
VMVirtualServer.VMScriptsEnabled( _
  ByRef isEnabled, _
  ByVal shouldEnable _
)

Property value

Contains vbTrue if scripts attached to any virtual machine are allowed to run.

This property value is read/write.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The isEnabled parameter is NULL.
DISP_E_EXCEPTION
An unexpected error has occurred.

Examples

The following example displays the VMScriptsEnabled property value of the VMVirtualServer object.

Set objVS = CreateObject("VirtualServer.Application")

Wscript.Echo "Name: " & objVS.Name
Wscript.Echo "Virtual machine scripts enabled: " & objVS.VMScriptsEnabled

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMVirtualServer