How do I prevent my laptop from shutting down when undocking?

I finally stumbled across something that seemed to work, though it was for a newer model HP elitebook running Win 7 Pro 64-bit.

In this case, the 'Power Options' settings options seemed to trigger the 'when I close the lid' action upon being undocked. I changed it Sleep, saved changes, then back to Do Nothing and saved the changes. At this point the laptop behaved as expected during the undock.

I tried this because I noticed that the lid close event seemed to be firing, despite being set to Do Nothing. It looks as though the value it reads to display the setting may not be the same value that is looked at to determine the action, and that they somehow got out of sync.