I need to launch a couple of commands from my WinRT application, like if it were a Command Console, in order to do this, on not WinRT apps the class to be used is System.Diagnostic.Process but on Win RT his class is not available, is there any equivalent class or method that i could use?
Thanks in advance :)
Windows Store Apps cannot launch other processes directly, as Marylin already said. You can only use Launcher.LaunchFileAsync to launch the default application for the file type (file ending) the passed file has. Using this you could define a self-defined file type like .process in Windows and set its handler application to a windowless desktop application you write. The desktop application reads the process file which has the path to the application stored that is to start and launches it using Process.
This trick would certainly fail the certification but may be useful in apps you deploy to businesses skipping the Store. A problem would be that the Windows Store App is set to the background if a Desktop application is launched. I think this is one reason that Microsoft does not allow it for certified apps.
You cannot do that from a Windows Store application - those are sandboxed and do not have access to other processes. More details here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With