1

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.

4
  • 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.
    – user1931
    Commented Nov 9, 2009 at 15:52
  • i33.tinypic.com/2z9mq77.jpg
    – Chris
    Commented Nov 9, 2009 at 15:56
  • Ah, thanks! Gonna need the file menu and shutdown dialog too (power off machine, send shutdown signal...) sorry for the hassle!
    – user1931
    Commented Nov 9, 2009 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
    Commented Nov 9, 2009 at 16:29

1 Answer 1

2

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

1
  • It worked first try? Even I'm surprised. You're very welcome :)
    – user1931
    Commented Nov 9, 2009 at 23:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .