{"id":122,"date":"2007-02-27T23:06:16","date_gmt":"2007-02-27T23:06:16","guid":{"rendered":"http:\/\/dalelane.co.uk\/blog\/?p=122"},"modified":"2007-02-28T00:00:53","modified_gmt":"2007-02-28T00:00:53","slug":"getting-command-shell-working-on-windows-mobile-5","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=122","title":{"rendered":"Getting Command Shell working on Windows Mobile 5"},"content":{"rendered":"<p>Microsoft provide a command shell for Windows Mobile as a part of their <a href=\"http:\/\/www.microsoft.com\/downloads\/details.aspx?FamilyID=74473fd6-1dcc-47aa-ab28-6a2b006edfe9\" target=\"_blank\">Developer Power Tools<\/a> package. <\/p>\n<p>I fancied giving it a try tonight (<em>for no particular reason other than that I like using the command line, and <a href=\"http:\/\/www.europe.htc.com\/products\/qtek9000.html\" title=\"HTC Universal\" target=\"_blank\">my phone<\/a> has a full QWERTY keyboard<\/em>) so followed the instructions to install it.<\/p>\n<p>No luck &#8211; it didn&#8217;t work. No errors, it just didn&#8217;t work &#8211; nothing happened.<\/p>\n<p>It took a bit of playing around with, but I&#8217;ve managed to get it running&#8230;<\/p>\n<p><!--more-->It needed a registry hack:<\/p>\n<p>set <code>HKEY_LOCAL_MACHINE\\Drivers\\Console\\OutputTo<\/code> to 0.<\/p>\n<p>I did it with a quick bit of code:<\/p>\n<pre><code>using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing Microsoft.Win32;\r\n\r\nnamespace RegistryAccess\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            RegistryKey baseKey = Registry.LocalMachine;\r\n            RegistryKey driversKey = baseKey.OpenSubKey(\"Drivers\", true);\r\n            RegistryKey consoleKey = driversKey.OpenSubKey(\"Console\", true);\r\n            consoleKey.SetValue(\"OutputTo\", 0);\r\n        }\r\n    }\r\n}<\/code><\/pre>\n<p>but if you have a registry editor, you can do it with that. (<em>I&#8217;m short of space on my phone at the moment, so have uninstalled every non-essential app, including my registry editor.<\/em>)<\/p>\n<p>Then after a reboot, the command shell seems to be working.<\/p>\n<p>The only downside is that it doesn&#8217;t seem to realise it&#8217;s running on a VGA screen, so the text is really small. But still&#8230; I have a command line now &#8211; yay! \ud83d\ude42<\/p>\n<p>\n<strong>Update:<\/strong> My first mobile command-line app was a port of my <a href=\"http:\/\/dalelane.co.uk\/page.php?id=34\" target=\"_blank\">command-line To-Do list tools<\/a> &#8211; after a quick try, they seem to work fine. I quite like this &#8211; it&#8217;s actually quicker than navigating to and filling in the Pocket Outlook forms to just enter the text I want then hit Enter. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft provide a command shell for Windows Mobile as a part of their Developer Power Tools package. I fancied giving it a try tonight (for no particular reason other than that I like using the command line, and my phone has a full QWERTY keyboard) so followed the instructions to install it. No luck &#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,3],"tags":[],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-code","category-tech"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":0,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}