{"id":517,"date":"2017-03-02T17:29:52","date_gmt":"2017-03-02T17:29:52","guid":{"rendered":"https:\/\/ibex.tech\/windows-iot\/?p=517"},"modified":"2017-03-02T17:29:52","modified_gmt":"2017-03-02T17:29:52","slug":"enabling-command-line","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/windows-10-iot-core\/command-line\/enabling-command-line","title":{"rendered":"Enabling Command Line"},"content":{"rendered":"<p>\n\tSSH and PowerShell connections can use the command line at will, because they have requried administrator log in to create the connection. &nbsp;However if command line access is not enabled for the default user you will get the following error for any command you try to run on the command line using the device itself (for instance using the IoTCoreDefaultApp):\n<\/p>\n<p style=\"margin-left: 40px\">\n\tAccess is denied. (Excep_FromHResult 0x80070005). Your device is not allowed to run the command line processor.\n<\/p>\n<h4>\n\tEnabling Command Line For IoT CoreDefaultApp and Other Applicaitons<br \/>\n<\/h4>\n<p>\n\tTo get rid of it log in using SSH or PowerShell, or use the web interface &#039;Processes&#039; page Run Command option. &nbsp;Run the following command:\n<\/p>\n<pre>\n<code>\nreg ADD &quot;HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\EmbeddedMode\\ProcessLauncher&quot; \/v AllowedExecutableFilesList \/t REG_MULTI_SZ \/d &quot;c:\\windows\\system32\\cmd.exe\\0&quot;\n<\/code><\/pre>\n<p>\n\t<em>Note &#8211; If you have enabled &#039;Windows IoT Remote Server&#039; (web config &#039;Remote&#039; page), allowing default account to run everything on the command-line is not safe option as every user in your network will be able&nbsp;to connect to the RaspberryPi and see its screen.<\/em>\n<\/p>\n<p>\n\t<em>Note &#8211; The web interface &#039;Processes&#039; page Run Command option won&#039;t tell you if the command succeeded or not (it always says&nbsp;it has), whereas SSH or PowerShell will.<\/em>\n<\/p>\n<h4>\n\tDisabling&nbsp;again<br \/>\n<\/h4>\n<p>\n\tYou can check there is just the one entry you added before deleteting it if you want to using this:\n<\/p>\n<pre>\n<code>\nreg QUERY &quot;HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\EmbeddedMode\\ProcessLauncher&quot; \/v AllowedExecutableFilesList\n<\/code><\/pre>\n<p>\n\tTo delete it use this:\n<\/p>\n<pre>\n<code>\nreg DELETE &quot;HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\EmbeddedMode\\ProcessLauncher&quot; \/v AllowedExecutableFilesList \/f\n<\/code><\/pre>\n<h4>\n\tGiving Your App More Permmissions<br \/>\n<\/h4>\n<p>\n\tYou may find that you still run into a brick wall with the command line from your app due to permissions. &nbsp;For instance trying to get an app to copy a package file into &quot;C:\\Windows\\Provisioning\\Packages\\&quot; will get an access is denied error. &nbsp;One solution that seemed worth a try was to simply elevate the user account that runs the app to be an administrator.\n<\/p>\n<p>\n\tThis command let you see all of the current users\n<\/p>\n<pre>\n<code>\nnet user\n<\/code><\/pre>\n<p>\n\tThis command adds the default user to the Administrators group:\n<\/p>\n<pre>\n<code>\nnet localgroup Administrators DefaultAccount \/add\n<\/code><\/pre>\n<p>\n\tHowever once you reboot you discover that the default IoTCoreDefaultApp wont&#039; startup fully and also your own app wont either. &nbsp;So another solution is needed&#8230;.\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SSH and PowerShell connections can use the command line at will, because they have requried administrator log in to create the connection. &nbsp;However if command line access is not enabled for the default user you will get the following error for any command you try to run on the command line using the device itself [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[],"class_list":["post-517","post","type-post","status-publish","format-standard","hentry","category-command-line"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/comments?post=517"}],"version-history":[{"count":0,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/517\/revisions"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}