Log in

View Full Version : TUTORIAL: Create links to the programs in your Settings menu!


Menneisyys
03-15-2006, 08:28 PM
TUTORIAL: Create links to the programs in your Settings menu! A full explanation & never-before-published, full comparison list

An often-asked question concerns how you can set up direct links to the control panel applets (CPL's for short) in Start/Settings.

What's the point in all this, you may ask. Why not simply tap Start and, then, Settings and, finally, the icon you want to execute?

Yes, for a casual user, there's not much need in creating self-standing links to these files. There're, however, cases when this can prove really useful – for example, the case of including them in Today launcher plug-ins that, otherwise, don't let access to any of these applets otherwise. A well-known example of plug-ins like those is Resco File Explorer's excellent Today plug-in or in the free cLaunch. (Please see this (http://www.pocketpcthoughts.com/forums/viewtopic.php?p=366634) (alternatives: iPAQ HQ (http://www.ipaqhq.com/forums/showthread.php?p=113155), AximSite (http://www.aximsite.com/boards/showthread.php?p=837330), PPC Magazine (http://pocketpcmag.com/forum/topic.asp?TOPIC_ID=18383), FirstLoox (http://www.firstloox.org//forums/showthread.php?p=40624), BrightHand (http://discussion.brighthand.com/showthread.php?s=&threadid=120439)) for more info on these excellent applications and the alternatives.)

Most of these settings are invoked from a central dialog file, \Windows\cplmain.cpl. Some additional, custom settings may have been put in a separate file, \Windows\mycpl.cpl. Finally, third-party applications that install their own settings dialogs create their own .cpl files inside the \Windows directory. For example, SOTi Pocket Controller (see this article (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=514&more=1) on it) creates a file DeviceConfig.cpl, Mad Programmer's FileDialogChanger (see this article (http://www.pocketpcmag.com/blogs/index.php?blog=3&title=how_do_i_install_all_my_applications_on&more=1) on it) uses a file named filedlgchg.cpl to offer the user the File Dialog Changer settings, Mad Programmer's Force Hi-resolution tool (see this article (http://www.firstloox.org//forums/showthread.php?t=3754) on it) puts a ForceHires.cpl file in there etc. The same stands for Spb Pocket Plus, MS Voice Command (please see this article (http://www.pocketpcthoughts.com/forums/viewtopic.php?p=366103) for a full roundup of all voice controller apps) and XCPUScalar.

What should I do?

It's simple: create a .lnk file with the following contents:

33#ctlpnl.exe cplmain.cpl,X

OR

33#ctlpnl.exe mycpl.cpl,X

where X is a number that I'll promptly elaborate on.

As has already been pointed out, only one file, cplmain.cpl (or, with some device, mycpl.cpl in addition) contains most of the settings accessible in Start/Settings. One file containing many small applets also means that you need to choose a particular one in some way. That's why you must index the file; this numeric index (1, 2 etc.) tells cplmain.cpl which particular applet you'd like to access.

As far as the possible values of this are concerned, there're standardized ones. If you check out the "iPAQ 3660" column in the comparison chart available here (http://www.winmobiletech.com/sekalaiset/CPLIndices.html) (and disregard the 3 - Power record and everything starting with "MyCpl – 0"), you'll see what you can expect from any Pocket PC 2002+ Pocket PC.

Note that WM2003 added the standard 22-Manage Certificates and WM5 the standard 24-Error reporting and, with most WM5 Pocket PC devices, 25-GPS. Also, Pocket PC Phone Edition devices, regardless of their operating system version, also use the 20 - Phone Settings index. Finally, all Pocket PC's with the Microsoft BT stack use 23 – MS Bluetooth too. (Devices with the Widcomm BT stack use the separate \Windows\BTConfigCE.cpl CPL.)

It's also very important to point out that 3 – Power and 6 – Backlight is not necessarily available in all devices. For example, the iPAQ 2210 lacks both, the iPAQ 3660 lacks 6 – Backlight , while all the other listed devices have them all.

Also note the records starting with MyCpl are, as you may have already guessed, non-standard ones. It's there that the two iPAQ's have some essential applets (Backlight and, with the 2210, also Power) and some additional goodies.

Please note that lists compiled by others (for example the XDA-Developers one (http://www.xs4all.nl/~itsme/projects/xda/xda-controlpanel.html)) are not generic enough and may contain several mistakes. Therefore, it's best not to rely on them at all. Also remember that you can freely test any indexes – you won't crash your Pocket PC if a particular index is unused.

You don't want to manually create .lnk files?

No problem, I've already done it for you! Just download this file (http://www.winmobiletech.com/sekalaiset/LinksToSystemAndMyCPLs.zip) and extract the link file(s) you'll need.

Note that the root directry of the ZIP file only contains CPL links that are guaranteed to work on all PPC2k2+ devices. I've put the additional ones in subdirectories – for example, links belonging to later operating systems (directories FromWM2003 and FromWM5), the 3 – Power and 6 – Backlight PCL's, the MS BT stack link and the PPC Phone Edition Phone Settings link.

Also, there's a separate subdirectory 'mycpl' for (unnamed – as you can also see in the comparison chart, indexes are wildly different between different devices) MyCpl link files.

Hope you'll find this information / my files useful. I really hope you'll like the new ability to include all this functionality in the Resco Today plug-in and/or cLaunch – or, for that matter, your operating system-level scripts!

Mallow1
03-29-2006, 12:53 PM
Hi Menneisyys,

Thanks for this... very very useful. Nice job. Quick question. Once on any particular screen the user typically then changes a setting then exits. Is it possible to add further paramaters to the link to toggle/change an option on a particular screen to automate this next step too. I ask as I would like to assign the lnk to say an icon in Wisbar to toggle a particular setting on and off simply by tapping the icon, say for example "Notifications (alarms, reminders)" in "Sounds & Notifications".

Many thanks - Mallow1

Menneisyys
03-30-2006, 09:09 AM
Hi Menneisyys,

Thanks for this... very very useful. Nice job. Quick question. Once on any particular screen the user typically then changes a setting then exits. Is it possible to add further paramaters to the link to toggle/change an option on a particular screen to automate this next step too. I ask as I would like to assign the lnk to say an icon in Wisbar to toggle a particular setting on and off simply by tapping the icon, say for example "Notifications (alarms, reminders)" in "Sounds & Notifications".

Many thanks - Mallow1

Thanks for the feedback and welcome to PPCT :)

What you need is impossible by parameterizing the given CPL file. However, this is not a problem - most of these applets alter the Registry. That is, if you want to change some setting automatically, just find out what must be changed in the registry for the changes to take effect. You can use for exaple WinDiff or SKTracker for this. Please see http://discussion.brighthand.com/showthread.php?s=&threadid=119094 for more info.

maikii
04-10-2006, 10:39 PM
Thanks once again, Menneisyys, for your great info.

I downloaded your zip file, and put a couple of your settings links on my Today screen with Scott Seligman's "Launcher" program. They work. Thanks.

One thing--that launcher program just shows icons, not names of the links. These settings links all show the same generic file icon.

Is there any way to assign an icon to those links, like the icons that show for those settings when you open the Settings applet?

-------

P.S. (unrelated to question above) In your post, you write about using an app called Windiff. I looked for that on Google, found an app with that name, but it does not appear to be a Windows Mobile app, but rather for the desktop PC. (You include links to a Brighthand article of yours about Windiff, but those links to Brighthand don't work.) Please tell us more here about the Windiff you were referring to.

Menneisyys
04-11-2006, 09:33 AM
Thanks once again, Menneisyys, for your great info.

I downloaded your zip file, and put a couple of your settings links on my Today screen with Scott Seligman's "Launcher" program. They work. Thanks.

One thing--that launcher program just shows icons, not names of the links. These settings links all show the same generic file icon.

Is there any way to assign an icon to those links, like the icons that show for those settings when you open the Settings applet?

-------

P.S. (unrelated to question above) In your post, you write about using an app called Windiff. I looked for that on Google, found an app with that name, but it does not appear to be a Windows Mobile app, but rather for the desktop PC. (You include links to a Brighthand article of yours about Windiff, but those links to Brighthand don't work.) Please tell us more here about the Windiff you were referring to.

Yes, all links to BrighHand are dead now (see the full story at http://www.pocketpcmag.com/blogs/index.php?blog=3&title=brighthand_has_a_new_forum_engine&more=1&c=1&tb=1&pb=1 ).

The new link is http://discussion.brighthand.com/showthread.php?t=215073

maikii
04-13-2006, 07:15 AM
No problem, I've already done it for you! Just download this file (http://www.winmobiletech.com/sekalaiset/LinksToSystemAndMyCPLs.zip) and extract the link file(s) you'll need.scripts!

Thanks for these, Menneisys!

I had a problem with one, however.

Using an HTC Wizard (T-Mobile USA MDA), WM5.

The problem is with the link to Phone Settings. WHen one opens it the normal way (through Settings) there are 5 tabs. When one opens it with your shortcut, the first tab is missing! Only four tabs!

Furthermore, some of the settings on the remaining tabs don't work. For instance the Caller ID setting on the Services tab. It works fine if one opens that control panel the normal way, through settings. But when opened via the shortcut, nothing happens when one tries to access the Caller ID setting.

Any way to fix this?