{"id":378,"date":"2010-02-05T17:11:31","date_gmt":"2010-02-05T22:11:31","guid":{"rendered":"http:\/\/www.e-consystems.com\/blog\/?p=378"},"modified":"2023-08-15T12:31:44","modified_gmt":"2023-08-15T07:01:44","slug":"wince-shortcut-to-control-panel-applet","status":"publish","type":"post","link":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wince-shortcut-to-control-panel-applet\/","title":{"rendered":"Creating shortcuts to Control Panel Applications"},"content":{"rendered":"<p style=\"text-align: justify;\">A recently invoked query on the MSDN news group for Windows CE has induced me to script this post. Most WinCE professionals\u00a0might be aware of creating short-cut for a file. <em>Now the\u00a0question is<\/em> &#8211; Would\u00a0it be possible to create a short-cut to every individual control panel application? The answer is a definite YES!<\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #3366ff;\"><strong>Shortcut syntax<\/strong><\/span><br \/>\nA shortcut file has the extension of .lnk, containing the following entry as a command line parameter.<br \/>\n<em>nn# command [optional parameters]<\/em><\/p>\n<p style=\"text-align: justify;\">Where \u201cnn\u201d denotes the number of characters followed by the # symbol. The \u201ccommand\u201d denotes the actual command and the <em>\u201c[optional parameters]\u201d<\/em> represent the optional arguments for the command. For example, <em>27#\\Windows\\iexplore.exe \u2013home \u2013<\/em> is a command to open internet explorer with home page. This entry should also be saved in the iexplore.lnk file.<\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #3366ff;\"><strong>Control Panel Applets<\/strong><\/span><br \/>\nControl panel applets are individual configuration tools, implemented in the form of .cpl files listed with icon and name in the Control Panel user interface. A .cpl file is a DLL that implements the CPlApplet API. Ctlpnl.exe loads and runs the control panel applets. A single .cpl file can contain single as well as multiple Control Panel applications.<\/p>\n<p><span style=\"color: #3366ff;\"><strong>Shortcut to Control Panel Applets<\/strong><\/span><br \/>\nNormally we can create short-cut for a single file or a .cpl file containing single control panel application in a straight forward approach. An example for this is as follows:<br \/>\n<em>33#&#8221;ctlpnl.exe&#8221; \\Windows\\intlp.cpl<\/em><br \/>\nWhere Intlp.cpl is a control panel applet for regional language settings that contains a single control panel application.<\/p>\n<p>Another example for a control panel applet containing multiple control panel application is cplmain.cpl.<br \/>\nFollowing is the\u00a0list of short-cut entries for each control panel application that resides in the Cplmain.cpl.<\/p>\n<ol style=\"text-align: justify;\">\n<li>PC Connection &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,0<\/li>\n<li>Dialing &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,1<\/li>\n<li>Keyboard &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,2<\/li>\n<li>Password &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,3<\/li>\n<li>Owner &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,4<\/li>\n<li>Power\u00a0 &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,5<\/li>\n<li>System &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,6<\/li>\n<li>Display &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,7<\/li>\n<li>Mouse &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,8<\/li>\n<li>Stylus &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,9<\/li>\n<li>Volume &amp; sounds &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,10<\/li>\n<li>Input Panel &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,11<\/li>\n<li>Remove Programs &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,12<\/li>\n<li>Date\/Time &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,13<\/li>\n<li>Certificates &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,14<\/li>\n<li>Accessibility &#8211;\u00a0 35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,15<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Ctlpnl.exe invokes the cplmain.cpl with its parameters 0 to 15 to execute the corresponding control panel applications. The parameter to the cplmain.cpl is given from 0 to 15 based on the array index value of <em>CPLAPPLETINFO rgApplets[] = { \u2026\u2026.}<\/em>. This control panel applet table presents in the <em>\\PUBLIC\\ WCESHELLFE\\OAK\\CTLPNL\\CPLMAIN\\cpltable.cpp<\/em> file.<\/p>\n<p><strong><span style=\"color: #3366ff;\">Exposing Shortcut on Desktop<\/span><\/strong><\/p>\n<p style=\"text-align: justify;\">\n<figure style=\"width: 554px\" class=\"wp-caption alignleft\"><a href=\"\/images\/blog\/WinceDateTime.jpg\"><img decoding=\"async\" loading=\"lazy\" title=\"Date-Time Control Panel Application Shortcut\" src=\"https:\/\/www.e-consystems.com\/images\/blog\/WinceDateTime.jpg\" alt=\"WinCE Shortcut\" width=\"554\" height=\"351\" \/><\/a><figcaption class=\"wp-caption-text\">WinCE Shortcut<\/figcaption><\/figure>\n<p>Following steps are involved to integrate the short-cut file with the OS image:<\/p>\n<ul style=\"text-align: justify;\">\n<li>To create the required short-cut, copy the short-cut command line parameter entry in notepad application and save it as a .lnk file. For example, short-cut file for Date-Time.lnk will contain the following entry.<\/li>\n<\/ul>\n<p style=\"padding-left: 30px; text-align: justify;\"><em>35#&#8221;ctlpnl.exe&#8221; \\Windows\\cplmain.cpl,13<\/em><\/p>\n<ul style=\"text-align: justify;\">\n<li>Copy this file to your \\WINCE600\\PLATFORM\\&lt;your BSP&gt;\\Files folder. This will then be automatically copied to your release folder during build process.<\/li>\n<\/ul>\n<ul style=\"text-align: justify;\">\n<li>Open a \\WINCE600\\PLATFORM\\&lt;your BSP&gt;\\Files\\platform.bib and add the following entry in the FILES section to make this short-cut file as a part of the nk.bin.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><em> Date-Time.lnk\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 $(_FLATRELEASEDIR)\\ Date-Time.lnk\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NK<\/em><\/p>\n<p style=\"padding-left: 30px; text-align: justify;\">This <em>Date-Time.lnk<\/em> will be resided in \\windows folder of your device.<\/p>\n<ul style=\"text-align: justify;\">\n<li>Open the \\WINCE600\\PLATFORM\\&lt;your BSP&gt;\\Files\\platform.dat and add the following entry to show the short-cut on desktop.<\/li>\n<\/ul>\n<p style=\"padding-left: 30px; text-align: justify;\"><em>Directory(&#8220;\\Windows\\LOC_DESKTOP_DIR&#8221;):-File(&#8220;Date-Time.lnk&#8221;,&#8221;\\Windows\\Date-Time.lnk&#8221;)<\/em><\/p>\n<ul style=\"text-align: justify;\">\n<li>The following figure shows the short-cut for Date-Time control panel application on the device desktop and also has been indicated by a red elliptical mark.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A recently invoked query on the MSDN news group for Windows CE has induced me&#8230;<\/p>\n","protected":false},"author":12,"featured_media":1371,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[190],"tags":[70,132],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/posts\/378"}],"collection":[{"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/comments?post=378"}],"version-history":[{"count":14,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/posts\/378\/revisions"}],"predecessor-version":[{"id":1879,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/posts\/378\/revisions\/1879"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/media\/1371"}],"wp:attachment":[{"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/media?parent=378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/categories?post=378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/tags?post=378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}