PDA

View Full Version : Computer standby from XBMC


dpassent
2008-04-02, 12:10
Is there any method that win32 XBMC act like xbox XBMC regarding shutdown? Right now when I select shutdown the application itself shuts down, but I want xbox-like behavior, that whole system shuts down or preferably becasue we are in the XP/Vista world system stands by without leaving XBMC application. That way after turning on we have sweet XBMC waiting for your commands :) Anyone tried to achive it? Custom keymap.xml? 3rd party app? Any ideas?

DP

bigbw
2008-04-02, 18:03
not sure how to intergrate it into xbmc, but I have a batch file that shuts down my pc with one keypress..

anyo
2008-04-02, 18:40
I know in the skin, with the linux build there is basically a command that can be put in to shut down the computer, instead of just XBMC... maybe this is possible in the windows build too?

bigbw
2008-04-03, 03:59
the following batch file will start xbmc and shut down your pc after you exit xbmc

xbmc
cd\
shutdown -u

this works as long as you have the windows command "shutdown" in the root dir..

i have tested this is works in XP, not sure about Vista..

dpassent
2008-04-03, 09:04
shutdown isn't problem. I want my komputer to stand by, not to shut down. I plan to replace the explorer.exe on my HTPC with XBMC. That way XBMC will start automaticly right after boot, and I want to stand by my PC from XBMC. I don't want to use any other application on this PC. Just like I don't use anything else on my Xbox (XBMC is my dashboard)

DP

bobrooney_78
2008-04-03, 09:42
That way XBMC will start automaticly right after boot, and I want to stand by my PC from XBMC. I don't want to use any other application on this PC. Just like I don't use anything else on my Xbox (XBMC is my dashboard)


i like this idea. I also heard of PE Builder/WinBuilder which can strip Windows XP to 200 MB and on which you can use PlugIns like Firefox, OpenGL. Could imagine that the boot time of a lean windows is also very short.

pt-1
2008-04-03, 11:14
Suspend to RAM or HDD would be nice too ;-)

dpassent
2008-04-03, 12:15
supend to ram = stand by, suspend to hdd = hibernate. it's all there - we just need a way to invoke those from XBMC

DP

matt_cyr
2008-04-03, 18:04
haven't tested it, but a batch file containing
rundll32.exe powrprof.dll,SetSuspendState
should send your pc into hibernate mode or standby depending on your power settings 'When I press the sleep button on my computer'

matt_cyr
2008-04-03, 18:09
Edit: In order to use standby then your system must have hibernation disabled.

matt_cyr
2008-04-03, 18:25
Man, I wish there was an edit for our posts.
anyway, a slightly better version of the code (for standby) would be
rundll32.exe powrprof.dll,SetSuspendState 0,1,0

the three numbers at the end (0,1,0) correspond to
Hibernate, - if true sets to hibernate instead of suspend
ForceCritical, - if true, the system does the operation immediatly
DisableWakeEvent - if true, the system disables wake events

BAG_Ass
2008-04-03, 18:48
I think WiSo just need to add "rundoscommand" function to XBMC and after in add it to keymap.xml file to link it to button remote or keyboard.

WiSo
2008-04-04, 09:59
If you have more insides let me know. More easier than for me to find the right places in the code.

spiff
2008-04-04, 13:28
wiso, there's already a system.exec() on linux - reuse that one.
it's a builtin command, see CUtil::ExecuteBuiltin

BAG_Ass
2008-04-04, 14:55
Thanks Spiff

WiSo
2008-04-04, 15:27
Yep u're right. Saw this once but didn't remember. I'll check that.