RogueSpear, on Nov 10 2005, 03:19 PM, said:
No I can't write a cmd script because the whole process is dependant upon WMI. That's one of the main reasons I started using VBscript for everything.
Hi,
Finally i had success with a cmd file.
In fact, i found a
VMware Command Line Tools where vmchk.exe tool inside (here attached bellow).
When vmchk.exe run from a Command Prompt IN a "VMware Virtual Machine", the message "
Runing inside VMWare <version 6>." is displayed.
When vmchk.exe run NOT IN a VMware Virtual Machine, the message "
Not runing inside VMWare." is displayed.
I wrote a small script calling vmchk.exe and check if run IN or NOT IN a VMware machine
@echo off
set vm=Runing inside VMWare <version 6>.
vmchk.exe >chkfile.dat
for /f "delims=!" %%a in (chkfile.dat) do set check=%%a
If "%check%" == "%vm%" VMwaretools.exe
and here pipe directly to a variable for UA install directly run from a CD
@echo off
for /f %%a in ('vmchk') do (
if "%%a=="Runing inside VMWare <version 6>." vmtools.exe
)
Enjoy
coucou
This post has been edited by coucou: 18 November 2005 - 06:22 AM