1.0

Table Of Contents
www.vmware.com
244
VMware ACE Administrator’s Manual
Writing Plug-In Policy Scripts
You may write your own plug-ins to control certain policies in VMware ACE. You may
use any language that is supported on the end users computer.
For security reasons, plug-ins must be deployed as part of a package and installed by
the package installer. They cannot be deployed separately to end users' computers
and cannot be modified by the end user.
Your plug-ins must write the appropriate values to StdOut. Output to StdOut maybe
up to 4096 bytes long.
After creating a project, place any scripts you want to use for that project in the
Project Resources folder under the project folder. They must be in the main
Project Resources folder, not in a subdirectory under that folder. If the scripts
need any additional resource files, place those files in the main Project
Resources folder, too. Your script should reference those resources using relative
paths.
Your plug-ins may also write messages to StdErr. Output to StdErr maybe up to 4096
bytes long. Any messages generated on StdErr are captured in the VMware ACE log
file on the end user’s machine at <UserAppData>\VMware\VMware
ACE\<package_name>\Virtual Machines\<VM_name>\vmware.log.
The exit code of a script indicates whether the script succeeded or failed.
The following environment variables are set in the script execution environment:
All plug-ins run each time the end user launches VMware ACE or resets the virtual
machine. Some may run more often. For example, an expiration plug-in is run once
each 24 hours, and you may specify the interval for running a network quarantine
plug-in by setting an update interval in the Network Quarantine Wizard.
Variable Description
VMWARE_NQ_DESCRIPTOR If custom network quarantine is in use, this variable holds the
network quarantine descriptor that was last set by an update.
VMWARE_EXPIRE_TIME This is the time at which this virtual machine will expire. If set to -1,
it means never expire; if set to 0, it means expired.
VMWARE_PROJ_ID The ID of the project to which this virtual machine belongs.
VMWARE_MVM_ID The ID of this virtual machine. The virtual machine ID is unique
within a project.