1

Literally just picked this up from scratch tonight, so bear with me.

I'm having a go at coding some Cortana commands, such as to shut down my computer (for example). I'm following this tutorial here through a Stack Overflow question I found here.

Everything works great - cortana picks up my command and runs the command as the tutorial states (display a pop up when the command is recognised).

However when I come to actually coding the shutdown command, System.Diagnostics.Process, it is not recognised. I have included the relevant using statements as well.

I've searched around and found (I think) that Process can no longer be used? Is this the case?

On another note, is there another way I can shutdown my machine from a C# Universal Windows App?:)

Community
  • 1
  • 1
Tom
  • 2,372
  • 4
  • 25
  • 45
  • The author of the video was asked about how to actually turn off the computer in the comments. He realized he didn't really know how to do it and posted [this question](http://stackoverflow.com/questions/33925096/how-to-execute-process-commands-or-similar-using-a-universal-windows-platform). It looks like its probably not possible. I'm tempted to just close this as a dupe of that. – Mike Zboray Feb 03 '16 at 22:06

1 Answers1

1

I don't believe there is anyway to shutdown the OS from a UWP app. They have removed any APIs from UWP which would have allowed this.

chief7
  • 14,263
  • 14
  • 47
  • 80