start process in windows 8 metro application

前端 未结 2 1880
孤城傲影
孤城傲影 2020-12-12 00:53

how can i start a process like rasphone.exe by code in windows 8 metro application? there is System.Diagnostics.Process but the System.Diagnostics in metro application doesn

2条回答
  •  抹茶落季
    2020-12-12 01:28

    Carl's answer is right. You could use a trick though: Create a normal .NET application without UI that gets the name of an executable passed in a file with a dedicated extension (like .launcher). This application would launch the application that is passed via the Process class. In Windows 8 the dedicated extension must be associated with the launcher application. That unfortunately must be done by hand (or maybe using a small setup application the user has to execute).

    In the Windows Store App you can then create a .launcher file with the path to the executable and launch this via the Launcher class.

提交回复
热议问题