This thread has been many times a useful reference to me, and helped me overcome the WebGadget limitation of old-browser behaviour, and enjoy some HTML5 in the WebGadget.
I'd like to keep it alive and add a few useful links on the topic, which have helped me further search the subject:
Also worth mentioning, that with
RegCreateKeyEx for
current user using
REG_OPTION_VOLATILE for
dwOptions allows to set browser compatiblity mode for the given executable without changing permanently the registry (and should not require high priviledges to run). Furthermore (unlike for
local machine), the registry key under
current user is the same for both 32 and 64 bit executables! (so no need to worry about bitness of app)
The registry key must be set
before opening the WebGadget!
Code: Select all
LONG RegCreateKeyEx(
HKEY hKey, // handle of an open key
LPCTSTR lpSubKey, // address of subkey name
DWORD Reserved, // reserved
LPTSTR lpClass, // address of class string
DWORD dwOptions, // special options flag
REGSAM samDesired, // desired security access
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // address of key security structure
PHKEY phkResult, // address of buffer for opened handle
LPDWORD lpdwDisposition // address of disposition value buffer
);
From MS documentation:
dwOptions — Specifies special options for the key. This parameter can be one of the following values:
[...]
REG_OPTION_VOLATILE — Windows NT: This key is volatile; the information is stored in memory and is not preserved when the system is restarted. The RegSaveKey function does not save volatile keys. This flag is ignored if the key already exists.
Nowadays, the ideal value of the compatibility mode is
11001 (aka Edge mode), which will use the highest browser version available on the machine (ie: IE11 on all modern Windows). Other values don't make much sense probably.