locked
I can't use Process.Start() in my WindowsS Store App.

    Question

  • Since, Process.Start() is the only way to execute CMD commands directly.
    But, when i m trying to use it in my Windows Store project, then i get NOTHING like Process class in System.Diagnostics.

    When i googled about it then i got few suggestions like :
    var cmd=Package.Current.InstalledLocation.GetFileAsync("C:\Windows\System32\cmd.exe");

    But, in this way i can't execute my own CMD commands rather, i 'm calling any .exe file

    #NeedHelp #Urgent

    Sunday, April 20, 2014 10:25 PM

Answers

  • Correct. Windows Store apps cannot directly launch other applications. There are no available API similar to Process.Start(). See .NET for Windows Store apps for discussion of the parts of the .Net Framework available to Windows Store apps.

    They can launch files or URIs into their default handlers, but file types that contain executable code are blocked.

    --Rob

    Sunday, April 20, 2014 10:56 PM
    Moderator
  • If you want to launch a cmd script or bat file you will need to write a desktop app. This is not possible from a Windows store app.
    Monday, April 21, 2014 3:17 AM
    Moderator

All replies

  • Correct. Windows Store apps cannot directly launch other applications. There are no available API similar to Process.Start(). See .NET for Windows Store apps for discussion of the parts of the .Net Framework available to Windows Store apps.

    They can launch files or URIs into their default handlers, but file types that contain executable code are blocked.

    --Rob

    Sunday, April 20, 2014 10:56 PM
    Moderator
  • Is there any way to excutute CMD commands internally ?

    As a alternative,  i tried excuting *.BAT but, it didn't work :(

    Sunday, April 20, 2014 11:26 PM
  • If you want to launch a cmd script or bat file you will need to write a desktop app. This is not possible from a Windows store app.
    Monday, April 21, 2014 3:17 AM
    Moderator