none
win8.1 商店应用,怎样可以开机自动启动? RRS feed

  • 问题

  • 对于desktop应用,很简单,把应用的快捷方式复制到

    C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

    目录下面就可以了。

    但是对于store应用,该怎么做才能使得它可以在开机后自动运行呢?

    2014年2月25日 10:25

答案

  • Hi,

    当windows store app不在前台的时候它就会被系统挂起或者停止掉,如果您想您的应用程序在开机的时候能自动运行,那是不可能的。即使您可以在startup上启动它,但是该程序不在前台的时候也会被挂起。如果您想您的应用程序能运行某些代码或者任务那么您可以使用background Task。您可以用system event 去触发一个background task

    http://msdn.microsoft.com/en-us/library/windows/apps/hh977058.aspx

    您可以尝试注册一个protocol,并且用ShellExecute 函数来启动它。

    祝您好运!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    2014年2月26日 2:33
    版主