Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to relaunch a Windows 10 IoT app programmatically

I have a Windows 10 IoT app developed in C#, and I need to relaunch the app when the configuration has changed. How can the app relaunch itself programmatically?

like image 593
Juan Carlos Velez Avatar asked Dec 04 '15 18:12

Juan Carlos Velez


People also ask

How do I restart an application in Windows 10?

Restart apps command isn't something new to Windows 10. In fact, it is available in the Settings since 2017. It can be found under Settings > Accounts > Sign-in options > Restart apps.

Is Windows 10 IoT the same as Windows 10?

Windows 10 IoT Editions While only running a single app, it still has the manageability and security expected from Windows 10. By contrast, Windows 10 IoT Enterprise is a full version of Windows 10 with specialized features to create dedicated devices locked down to a specific set of applications and peripherals.

Can Windows 10 IoT run Office?

1 Answer. Office 365 App can not run on Windows IoT Core, but it can run on Windows IoT Enterprise.


1 Answers

Base on the Richard's comments I have resolved as follows:

  1. I set my application as the default application (see picture)
  2. When I need to relaunch the app, simply close it and the operating system opens again.

Setting the default app How to set the default app

The code for close the app is:

private void Exit()
{
   Windows.ApplicationModel.Core.CoreApplication.Exit();
}
like image 69
Juan Carlos Velez Avatar answered Oct 06 '22 15:10

Juan Carlos Velez