Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When you run a Windows 8 modern UI (previously called Metro) app that has background tasks, you must explicitly choose if it is allowed to run background tasks.

Windows Background Task

Is there a way to automate this?

I have tried watching the registry with ProcMon and dumped registry changes before and after allowing the app to run in background but exporting and importing the differences did not work.

I also tried copying the c:\Users\\Settings\settings.dat file and it also didn't work.

Any ideas?

Any hacky help is appreciated.

share|improve this question
    
I know this is probably a dumb question, but have you tried task scheduler? –  JustinD Dec 13 '12 at 17:24
    
Modern UI applications cannot run in the background. If they do not have focus they are placed into a suspended mode. Only a few key features are able to work in this mode. –  Ramhound Dec 13 '12 at 17:24
1  
Hi guys, I'm talking about these background tasks: blogs.msdn.com/b/windowsappdev/archive/2012/05/24/… –  Felipe Knorr Kuhn Dec 13 '12 at 17:28
    
@Ramhound: From that link seems any Metro app can be coded to run in the background. –  Karan Dec 13 '12 at 20:26
add comment

1 Answer

Do you mean can you take a Metro UI application that was not designed to run with a background task component and get it to run in the background? If so, the answer is no. The developer must specify at design time when the application is created that the app will have a background task and add that background task as part of the application creation.

Or do you mean is there a way to programmatically get around the dialog box asking a user's permission to run a background task. If so, the answer is, again, no. This is part of the security design of the Windows Store Application environment. Security is much, much tighter than previous editions of Windows and many things you could do before are no longer allowed. This is by design.

share|improve this answer
1  
I meant the latter :) Microsoft does not allow you to launch Windows Store apps via the command line too, but you can do it with PowerShell scripts. Considering this is for testing purposes, I believe there must be a way to do this, even if it is not officially supported by Microsoft. –  Felipe Knorr Kuhn Dec 13 '12 at 17:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.