Just after upgrading our hosts from VMware 4.0 to 4.1 I ran across a little problem. None of the guest machines could get the VMware tools upgraded automatically. I had to log into each machine and upgrade the tools (ok I only did 2 or 3 manually). It turns out that if the VMware tools had been upgraded on the guests before they would have c:windowstempVMwareToolsUpgrader.exe and this file needs to be deleted before the upgrader will run automatically.
So I didn’t really want to log into 80 machines to delete this file manually, so I came up with a quick batch file to delete this file on every machine in the company.
for /F %%a in (cp.txt) do attrib -r %%ac$windowstempVMwareToolsUpgrader.exe for /F %%a in (cp.txt) do del %%ac$windowstempVMwareToolsUpgrader.exe
Export the list of computers being hosted by VMware and save them as cp.txt.
This batch file removes the read only attribute from the file, then deletes the file. That’s right the file is read only so you can’t just delete it.
Just take the code above, stick it in a batch file and run it from a domain account that has rights to every server.
DennyContact the Author | Contact DCAC