locked
Can't use System.Diagnostics.Process in Metro appz?

    Question

  • Hi,

    I have made a metro application with Windows 8 DP/VS11, and it seems that I can't include System.Diagnostics.Process.

    I can include some components like System.Diagnostics.Contracts for example, but not Process.

     

    When I use the Object browser, I can see the Process component.

    Any help please? I have searched a lot and found no information about that.

    Monday, December 26, 2011 7:40 PM

Answers

All replies

  • I believe the Process class was left out on purpose.  The design of Metro is a bit more like the phone - you can't directly manipulate the system in the same way.  There isn't a directly "Process" in the Windows Runtime (see http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx), which in turn means the Process class wouldn't make sense to port...

     


    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Tuesday, December 27, 2011 12:03 AM
  • Ok, then how do I grand my application the correct token privilege?

    I need to call exitWindowsEX, and without the Process class, I have no idea how I can get that.

    See: http://msdn.microsoft.com/en-us/library/windows/desktop/aa376871(v=vs.85).aspx

    I want to do something equivalent in C#, but I need the Process class ... :(

    Tuesday, December 27, 2011 12:10 PM
  • Hi Anthony,

    You cannot do this in a Metro Style app.

    -Jeff


    Jeff Sanders (MSFT)
    • Marked as answer by Bob_Bao Thursday, January 5, 2012 7:25 AM
    Tuesday, December 27, 2011 2:22 PM
    Moderator
  • How ridiculous !

    I have a launcher application that has 13 sub modules which I want to start using the process command.

    Why on earth cant I do this from an array of buttons in a metro app?

    I feel this is a huge mistake on Microsoft's part.

     


    n.Wright

    Monday, May 28, 2012 9:41 PM