useridle和systemidle超时值 [英] useridle and systemidle timeout values

查看:95
本文介绍了useridle和systemidle超时值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好:



我写了一个程序,可以捕获并显示任何电源系统通知更改,例如系统进入
useridle state或systemidle state。



我发现在启动系统时, 在1分钟的空闲时间之后触发用户ID时间,并且在5分钟的空闲时间之后触发systemidle超时?
$


问题是我有注册表设置为导致用户ID发生的条目在15分钟内完成,所有其余条目设置为"从不"。 



但只有在我手动进入控制面板之前 - > Power-> Schemes-> AC Power并按'确定'15分钟值生效。

我的第一个目标是弄清楚如何获得值I 已经放置在注册表中,当设备首次启动时生效。



我将注册表项设置为以下内容,我在注册表中看到了 单位启动,所以我假设设置正确。



[HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet \Control\Power\Timeouts]

" ACSuspend" = dword:0;从来没有b $ b" ACSystemIdle" = dword:0;从不。

" ACUserIdle" = dword:384; 15分钟。

" BattSuspend" = dword:0;从来没有b $ b" BattSystemIdle" = dword:0;从不。

" BattUserIdle" = dword:0;从来没有。

; CMC ... 6/27/2012 ...设置背光超时。

[HKEY_CURRENT_USER \ControlPanel \ Backlight]

" ACTimeout" = dword:384 ; 15分钟b
; CMC ... 6/27/2012 ...由于我们没有使用电池,请选中不使用电池。

[HKEY_CURRENT_USER \ControlPanel \ Backlight]

" UseBattery" = dword:0
$


所以我无法弄清楚为什么用户节目时间在闲置1分钟后触发,当设备首次启动时,系统指示超时是在5分钟的空闲时间后触发的?这些值最初设置在哪里?我是否需要
来包装上面显示的这些注册表项; HIVE BOOT SECTION和;结束HIVE BOOT SECTION上市让他们生效?我希望你可以指出我正确的方向找出这个。



我的第二个问题是我怎样才能以编程方式触发系统阅读 注册表中的值并触发系统将它们用作新的超时值。  我写了一个接受新ACTmeout值的程序,并将
的新值写入注册表,但它永远不会生效。 只有在我手动进入电源属性并按下电源属性上的"确定"后,它才会触发更改并生效。我希望你能告诉我什么命令
我可以放置应用程序以迫使系统使用新的超时值I 放在ACTimeout值中。



我猜测答案可能在Power Properties源代码中。其中 是在控制面板中运行"电源属性"设置的源代码?



谢谢;

Hello:

I wrote a program that captures and displays any Power System Notification changes like when the system goes into useridle state or systemidle state.

What I have discovered is that upon booting the system,  the useridle time is triggering after 1 minute of idle time and the systemidle timeout is triggering after 5 minutes of idle time?

The problem is that I have the registry entries set to cause the useridle occur in 15 minutes, with all the rest set to 'never'. 

But only until I go manually into the Control Panel->Power->Schemes->AC Power and press the 'ok' does the 15 minute value go into effect.
My first goal is to figure out how to have the values I have placed in the registry take effect when the unit first boots up.

I have the registry entries set to the following which I do read in the registry after the unit boots up so I presume that are getting set correctly.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\Timeouts]
"ACSuspend"=dword:0 ; never
"ACSystemIdle"=dword:0 ; never.
"ACUserIdle"=dword:384 ; 15 minutes.
"BattSuspend"=dword:0 ; never
"BattSystemIdle"=dword:0 ; never.
"BattUserIdle"=dword:0 ; never.
; CMC...6/27/2012...Set timeout for backlight.
[HKEY_CURRENT_USER\ControlPanel\Backlight]
"ACTimeout"=dword:384 ; 15 minutes
; CMC...6/27/2012...UnCheck to not use Battery since we don't run on a battery.
[HKEY_CURRENT_USER\ControlPanel\Backlight]
"UseBattery"=dword:0

So what I can't figure out is why the the useridle time is triggering after 1 minute of idle time and the systemidle timeout is triggering after 5 minutes of idle time when the unit first boots up? Where do those values initially get set? Do I need to wrap these registry entries shown above between a ;HIVE BOOT SECTION and ; END HIVE BOOT SECTION listing for them to take effect? I was hoping you might point me in the right direction on finding this out.

My second question is how can I do programmatically trigger the system to read the values in the registry and trigger the system to use them as the new timeout values.  I wrote a program that accepts a new ACTmeout value and writes that new value into the registry, but it never takes effect.  Only after I manually go into the Power Properties and press the 'ok' on the Power Properties, will it trigger the change and take effect. I am hoping you can tell me what command I can place the application to force the system to use the new timeout value I place in the ACTimeout value.

I'm guessing the answer is probably in the Power Properties source code. Where  is the source code that run the Power Properties settings in the Control Panel?

Thanks;

推荐答案

查看http://www.e-consystems.com/blog/windowsce/?p=112
Have a look at http://www.e-consystems.com/blog/windowsce/?p=112


这篇关于useridle和systemidle超时值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆