Another way to conditionaly install tools to VM's (only tested on VMware server)
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colBIOS = objWMIService.ExecQuery("Select SerialNumber from Win32_BIOS")
For each objBIOS in colBIOS
If Left(objBIOS.SerialNumber, 6) = "VMware" Then 'Install Tools
msiexec.exe /i "VMware Tools.msi" /qb-! INSTALLLEVEL=1000 REBOOT=ReallySuppress
End If
Next
Check if the host hypervisor is VMware or VirtualBox and silent install the appropriate tools. The folder containing "VMware Tools.msi" must also contain the appropriate .cab files and "Program Files" folder from the VMware Tools .iso .
FOR /F "TOKENS=*" %%I IN ('wmic.exe csproduct get Name /Value ^| FIND "="') DO (
SET PRODUCT.%%I
)
IF /I "%PRODUCT.Name%"=="VMware Virtual Platform" (
START "" /WAIT %SYSTEMROOT%\system32\msiexec.exe /i "\Software\VMware\VMware Tools.msi" /passive /norestart /l* %SYSTEMDRIVE%\TEMP\toolsinst.log
)
IF /I "%PRODUCT.Name%"=="VirtualBox" (
START "" /WAIT "\Software\VirtualBox\VBoxWindowsAdditions-x86.exe" /S /xres=1280 /yres=768
)
Questions & Answers related to Unknown Uninstall VMware Tools
Blogs (0)
Blog posts related to Unknown Uninstall VMware Tools
Links (0)
Links related to Unknown Uninstall VMware Tools
Reviews (0)
Reviews related to Unknown Uninstall VMware Tools
This website uses cookies.
By continuing to use this site and/or clicking the "Accept" button you are providing consent
Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our
websites or when you do business with us. For more information about our
Privacy Policy and our data protection
efforts, please visit
GDPR-HQ