Log in

View Full Version : Windows Mobile 5 and Internet Explorer Mobile Identification in the Registry


Menneisyys
03-17-2006, 05:19 PM
In my previous article (http://www.pocketpcmag.com/blogs/index.php?blog=3&title=how_do_i_change_the_user_agent_informati&more=1) on how Pocket Internet Explorer (of which the new name is Internet Explorer Mobile (IEM for short) under Windows Mobile 5 (WM5)) computes the request headers (of which you can also seen some examples of in this article (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=482&more=1) - with alternative browsers too), I've elaborated on this under pre-WM5 operating systems.

In this article, I do the same - now with WM5. The affected registry keys are slightly modified here (a 5.0 has been added in the name) - and also a new Templates subkey has been added.

As can also be read in the previous, pre-WM5 article, in order to make Web servers think you are running a desktop browser, you'll need to modify the String values under [HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Internet Settings\ 5.0\ User Agent].

In general, modifying the value Version will suffice (from the original MSIE 4.01 (note that pre-WM5 OS'es used "MSIE 4.0" only) to MSIE 6.0); in some very rare cases, some Web servers may also require that you also modify the values Desc, Platform and/or the subkey Post Platform too (in the way I've described in the above article and in the Bible of Pocket PC Web Browsers - see the Recommended Links section for the links).

Two other remarks, as far as the bold parts of the registry key are concerned:

* some WM5 Pocket PC's (for example, the Dell Axim x51v) use the word "Software" without FULL CAPITALS; other Pocket PC's (for example, the i-mate k-jam (HTC Wizard)), on the other hand, use it fully capitalized; that is, as "SOFTWARE". Most people / articles refer to it fuly capitablized. Don't be afraid of the Dell Axim x51v having it in Sentence case.
* As can be seen, there's only one major change between WM5 and previous versions: WM5 uses an additional 5.0 in the registry key name. This also means registry tools or IEM plug-ins (http://www.pocketpcmag.com/blogs/index.php?blog=3&title=link_collection_to_the_latest_pocket_pc&more=1) that modify this must be explicitly WM5-compliant for the changes to be seen.

A brand new Templates subkey

Incidentally, WM5 has introduced a very interesting key [HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Internet Settings\ 5.0\ User Agent\ Templates\ ]. The two subkeys there, Same as Pocket PC and Same as Windows XP, contain different values for Version and Platform :

click for screenshot (http://www.winmobiletech.com/032006WM5IEMIdentification/WM5PIETemplates.bmp.png)

Interestingly, here, the value of "Platform" for Same as Pocket PC is "Windows CE; PPC; 240x320" (this is the case with the VGA x51v as can be seen in here (http://www.winmobiletech.com/032006WM5IEMIdentification/IEMPlatformx51v.bmp.png); with other devices, it may be different; for example, with the i-mate k-jam, it's "Windows CE; i-mate K-JAM PPC; 240x320" as can be seen in here (http://www.winmobiletech.com/032006WM5IEMIdentification/IEMPlatformKjam.bmp.png)) and not simply "Windows CE" as in [HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Internet Settings\ 5.0\ User Agent\ Platform] (see screenshot here (http://www.winmobiletech.com/032006WM5IEMIdentification/IEMPlatform.bmp.png)).

The additional "PPC; 240x320" in Platform is the value coming from the Post Platform (please see the explanation of this registry key in the Bible of Web Browsers). Yes, these two subkeys (Same as Pocket PC and Same as Windows XP) don't contain a separate Post Platform but the PPC-related one contains the value of the Post Platform right in the Platform string. This (one part of the registry uses a combined and one part uses a separate approach of creating the User-Agent HTTP request header that is finally sent out to the Web server) is certainly an oversight in the Registry, which should be kept in mind when dealing (for example, blindly using its value) with [HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Internet Settings\ 5.0\ User Agent\ Templates\ ]

It must be pointed out that the contents of Templates isn't used by IEM in any way. That is, from IEM, you can't just change between the two (there's no "change browser identification to desktop IE6" in IEM, for example). The introduction of this key may mean that future versions of IEM will offer the user a way to easily switch the browser identification headers from inside IEM, though.

Other remarks

Otherwise, the rules haven't changed over the older operating system versions. That is, if you change these values, the changes will be seen in all IEM instances started after the change - but not in the current one. That is, existing IEM instances must be exit (for example, using Ctl-Q on the built-in keyboard or explicitly killing the given process) so that subsequent requests contain the modified headers. This means it's not needed to reset your PPC (which can be very lengthy on WM5 devices - in general, around or more than a minute, even without Today plug-ins or startup-time programs) at all for the changes to be visible.

Recommended links

Bible of Pocket PC Web Browsers (http://www.pocketpcthoughts.com/index.php?action=expand,42026) (alternatives: FirstLoox (http://www.firstloox.org/forums/showthread.php?p=35739), MobilitySite (http://www.ipaqhq.com/forums/showthread.php?p=102643) AximSite (http://www.aximsite.com/boards/showthread.php?p=780770), PPC Magazine (http://pocketpcmag.com/forum/topic.asp?TOPIC_ID=17343), BrightHand (http://discussion.brighthand.com/showthread.php?s=&postid=775428)).

(NOTE: I've inserted a space after every backslash \ so that the forum engine formats even long registry key names nicely, without breaking up the text. Those space characters do not belong to the key names, though.)