Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
I have already made my metro app based on PC security and its working fine.
 
I want to start this metro app on Windows Startup, for that i have made a Windows Service so that it can start my metro app.
 
Problem : How to start a metro app from Windows Service ?
 
I have googled it alot but couldn't find any solution working for me..
 
Any change shouldd be done in my metro app so that it can start from other process ??
 
I have tried till Now :
 
Method-1
Process.Start("redhawk:\\")
I have given "redhawk" as my metro app's protocol name.
 
Method-2
Process.Start("metro.bat")
 
And the contents of
metro.bat
is as follows :
start "" "redhawk:"
 

Note : The 2nd method starts my metro app but it stucks on the splash screen. Should i change something in my metro app to avoid this ??
 
I have also read about OnActivated() event but couldn't apply it successfully..
 
Please Help Me As Soon As You Can... Thanks in advance...
Posted 21-Mar-13 22:24pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I don't believe this is possible.  Every action a Windows 8 application takes must be made by user interaction, and so starting it automatically would be against that rule.  You should, however, be able to add a background task that can gather data in the background while your app isn't running.  Have you considered that?
 
here's a great sample that shows how to implement a background agent, in JS, C#, VB, and C++:
 
http://code.msdn.microsoft.com/windowsapps/Background-Task-Sample-9209ade9
  Permalink  
Comments
Vivek-The Geek at 25-Mar-13 10:32am
   
Thanks for the reply..
 
yes i know about the background task, but actually i am trying to authenticate the user from my metro app therefore it can't be done by background task. I need some user interaction to authenticate the user.
 
in fact i wanted my metro app to be launched at the windows login time but as its not possible, i am trying to authenticate the user after windows login.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 25 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100