SQL Server with Mr. Denny

Sep 30 2010   11:00AM GMT

VMware 4.1 VMware Tools upgrade fails

Denny Cherry Denny Cherry Profile: Denny Cherry


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:\windows\temp\VMwareToolsUpgrader.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 %%a\c$\windows\temp\VMwareToolsUpgrader.exe
for /F %%a in (cp.txt) do del %%a\c$\windows\temp\VMwareToolsUpgrader.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.


 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: