Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So my situation is that I am running VMware workstation to run a LAMP server for some lightweight data collection. My host OS is Windows XP. I have a APC UPS that is set to shut down the PC via PowerChute if a power outage hits.
What I am wondering is if there is some way to gracefully shut down the LAMP server because I am pretty sure that VMware will keep PowerChute from shutting down the PC if there is a VMware appliance running.

share|improve this question
    
Can you show me an example of the window that pops up when the PC is trying to shut down (The vmware one). IIRC it says something like virtual machine still in use but I need the exact text and I can make you an autohotkey script to close the virtual machine properly. –  John T Nov 9 '09 at 15:52
    
i33.tinypic.com/2z9mq77.jpg –  Chris Nov 9 '09 at 15:56
    
Ah, thanks! Gonna need the file menu and shutdown dialog too (power off machine, send shutdown signal...) sorry for the hassle! –  John T Nov 9 '09 at 16:03
    
i35.tinypic.com/2rmo9co.jpg -- Shut Down Guest is the option that must be used. Followed by i33.tinypic.com/snmpog.jpg –  Chris Nov 9 '09 at 16:29

1 Answer 1

up vote 2 down vote accepted

This should do the trick:

#Persistent
SetTitleMatchMode, Slow
WinWait,,virtual machine is in use,,,
{
    WinMaximize
    Send { Enter }
    Send { Alt } 
    Send { Right 3 }
    Send { Down }
    Send { Right }
    Send { Down 5 }
    Send { Enter }
    Sleep 5000
    Send { Enter }
}

You'll need to install AutoHotkey

share|improve this answer
    
You are amazing. thank you! –  Chris Nov 9 '09 at 21:58
    
It worked first try? Even I'm surprised. You're very welcome :) –  John T Nov 9 '09 at 23:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.