I put this together and it works for me on Windows 8.1, though MSDN states it should work for WinXP as well:
Under Global Lua:
powrprof = alien.core.load("powrprof.dll")
gSetSuspendState = powrprof.SetSuspendState
gSetSuspendState:types{ret = 'long', abi = 'stdcall', 'long', 'long', 'long'}
function aSetSuspendState(Hibernate, ForceCritical, DisableWakeEvent)
return gSetSuspendState(Hibernate, ForceCritical, DisableWakeEvent)
end
Action Lua Script:
local bHibernate = true
local bForceCritical = true
local bDisableWakeEvent = false
aSetSuspendState(bHibernate, bForceCritical, bDisableWakeEvent)
See this link for the specifics regarding the three possible parameters:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa373201.aspx