| English | Japanese | Author: Ken Kato Mail: chitchat<DOT>vdk<AT>gmail<DOT>com |
Checks if it is running inside VMware and output the result to standard output. Also returns the result as return status (ERRORLEVEL) so you can use it in DOS batch files. If you don't want it to print to screen (for example, when using in a batch file), simply redirect the output to NUL device.
When outside VMware (i.e. in real machine), return status is 0.
When inside VMware, return status is "version number"
returned by VMware.
What this "version number " means is anyone's guess.
Options:
None.
Examples:
When outside VM
C:\>vmchk
Not running inside VMware.
When inside VM
C:\>vmchk
Running inside VMware (version 6).
A batch file example
@echo off
vmchk > NUL
if errorlevel 1 goto inside
echo Not in VM!
...
:inside
echo Inside VM!
...
Connects and disconnects devices. Also prints current device state to standard output.
Options:
vmdev [<action>][<device>]
| <action> | |
| + | Connect target device(s). This is the default. When the target device is already connected, this option causes it to be disconnected and reconnected. (Well, I'm a bit proud of this feature. It's convenient. Honest!) |
| - | Disconnect target device(s). |
| <device> | |
| 0..9 | Target device number to connect / disconnect. |
| * | Represents all devices present. This is the default. |
When both <action> and <device> options are omitted, it only shows current device state list. Connected devices are marked with '+' in the list.
Examples:
To print current device state list:
vmdevTo connect (or reconnect) all devices:
vmdev * or vmdev +* or vmdev +Likewise, to disconnect all devices:
vmdev -* or vmdev -To connect (or reconnect) device number 2:
vmdev 2 or vmdev +2To disconnect device number 1.
vmdev -1
Enables and disables following preference settings. Also prints current setting list to standard output.
Options:
vmpref [[<action>]<feature>]
| <action> | |
| + | Enables specified feature. |
| - | Disables specified feature. |
| When <action> option is omitted, the default action is to 'toggle' current setting. | |
| <feature> | |
| G | Grab when cursor enters window. |
| U | Ungrab when cursor leaves window. |
| S | Scroll when cursor approaches window edge. |
| C | Copy and paste between host and guest. |
| T | Time syncronization between host and guest. |
<feature> options are case insensitive. When <feature> options is omitted, it only shows current preference setting list.
Examples:
To print current preference setting:
vmpref or vmpref + or vmpref -To toggle 'copy and paste' feature:
vmpref cTo enable 'time syncronization' feature:
vmdev +tTo disable 'ungrab' feature:
vmdev -u
Syncronizes guest's clock to host's clock, when executed. Also prints updated current time to standard output. It is not yet capable of running background so you have to run it periodically to have host and guest in sync for a long period of time.
Options:
None
To Do:
None for WIN32 version. In fact, WIN32 version is just useless since
there is official VMware-Tools.
DOS16 version is going be rewritten as a TSR program.
Actually I have experimentally written a TSR version in C language
with existing TSR library, but it is not quite usable because it
consumes too much memory and CPU time.
Reads text data from standard input and copy it to host's clipboard.
Although both versions read text from standard input, DOS16 version does not
accept keyboard input (actually it does, but it never waits for input so
unless you can type very fast it quits before you type anything).
This program is intended to be used with pipe and/or redirection.
WIN32 version can send maximum of 65,355 bytes, which I believe to be a limitation imposed by VMware. DOS16 version can handle slightly less, somewhere around 65,000 bytes.
Just like official VMware-Tools, only text data can be transferred. This is, as it turned out, because VMware performs LF - CR/LF conversion unconditionally.
For this program to work, VMware's copy & paste feature must be
enabled. VMware simply doesn't pass any data when it is disabled.
And here's a catch. When you use this (either DOS16 or WIN32 version)
in Windows guest with official VMware-Tools running, you must disable
the copy & paste feature after you sent data to host.
Otherwise official VMware-Tools overwrites host's clipboard when you release
cursor from guest (with text stored in guest's clipboard), so you can never
retrieve the text you sent from guest.
You can automate it with a simple batch file, if you like:
@echo off
REM ensure that copy & paste is enabled
vmpref +c
REM copy data from stdin
vmcopy
REM now disable copy & paste
vmpref -c
Options:
None.
Examples:
To copy text from a file:
vmcopy < somefile.txtTo copy result of a command:
dir | vmcopy
To Do:
Some kind of filter to enable binary data transfer.
An ordinary binary/text encoder/decoder combination on both
host and guest should do.
Reads text data from screen and copy it to host's clipboard.
There is no WIN32 version because it would be just plain useless.
Use official VMware-Tools instead.
In the same way as vmcopy, this program needs
that VMware's copy & paste feature enabled because
VMware doesn't pass any data when it is disabled.
And be careful when you use it in Windows guest with official VMware-Tools
running, you must disable the copy & paste feature after you
sent data to host.
Otherwise official VMware-Tools overwrites host's clipboard when you release
cursor from guest (with text stored in guest's clipboard), so you can never
retrieve the text you sent from guest.
You can automate it with a simple batch file:
@echo off
REM ensure that copy & paste is enabled
vmpref +c
REM copy data from stdin
vmscr
REM now disable copy & paste
vmpref -c
Options:
None.
Examples:
When combined with vmpaste you can take a "screen shot" of DOS guest within the guest alone, borrowing host's clipboard.
vmscr
vmpaste > screen.txt
To Do:
A TSR version with some hot-key combination to take screen shots
whenever you like.
Reads text data from host's clipboard and write it to standard output.
Like vmcopy, it is intended to be used with pipe
and/or redirection.
VMware passes 65,355 bytes at maximum, and both DOS16 and WIN32 versions can handle that much. When host's clipboard holds larger data than that, VMware doesn't pass any data to guest.
VMware's copy & paste feature must be enabled for this program to work. Other precautions mentioned in vmcopy sention are not necessary.
Unlike other VMTools Command Line Tools programs, this program writes error message to standard error (WIN32) or directly to screen (DOS16) because standard output is likely to be redirected.
Options:
None.
Examples:
To save text from host's clipboard to a file:
vmpaste > somefile.txtTo send text from host's clipboard to other program:
vmpaste | sort > sorted.txt
To Do:
A TSR version that emulates keyboard input so that it can send data to
(almost) any other programs, such as DOS text editor.
This program causes VMware to popup that infamous
A bootable CD-ROM disc, floppy diskette, or hard disk was not detected.dialog in the host. I have no idea how this can be useful for anyone, but I've included this anyway.
Options:
None.
Examples: