Installing and Configuring

Table Of Contents
n
On Linux, Solaris, and FreeBSD guest operating systems, to edit a script, make sure xterm and vi are
installed in the guest operating system and are in your PATH, or specify which editor to use by setting
the EDITOR environment variable.
n
If you plan to script the commands used in this procedure and need to know what the exit codes are, see
“Exit Codes,” on page 39.
Procedure
1 Examine the contents of the default scripts to determine whether you want to create a custom script by
making changes and saving the edited scripts in a new location.
Operating System Action
Windows
Edit scripts in Program Files\VMware\VMware Tools.
Linux Solaris, and FreeBSD
Edit scripts in /etc/vmware-tools.
2 Write new scripts or modify default scripts and save them with new names.
Operating System Action
Windows
If you write a new script, create the script as a batch file.
Linux, Solaris, and FreeBSD
Create the script in any executable format, such as a shell or Perl script.
3 Open a command prompt or terminal in the guest operating system.
4 Change to the VMware Tools installation directory.
Operating System Default Path
Windows
C:\Program Files\VMware\VMware Tools
Linux and Solaris
/usr/sbin
FreeBSD
/usr/local/sbin
5 Enter the command to enable the script.
utility-name
script
script-name
enable
Option Action
utility-name (On Windows)
Use VMwareToolboxCmd.exe.
utility-name (On Linux, Solaris, and
FreeBSD)
Use vmware-toolbox-cmd.
script-name
Use power, resume, suspend, or shutdown.
6 Enter the command to use the custom script you created.
utility-name
script
script-name
set
script-path
For script-path, use the full path to the file, such as, "C:\Temp\poweron-my-vm.bat".
7 Enter the command to verify that the custom script you specified is now being used.
utility-name
script
script-name
current
After you complete this procedure, the VMware Tools service runs the script whenever the specified power
operation occurs.
Chapter 4 Using the VMware Tools Configuration Utility
VMware, Inc. 35