Context Menu Extensions on Internet Explorer - require restart of IE to see changes

A

ari

I have a javascript file that is activated as a context menu
extension
under internet explorer. Successive calls to this file steps through
successive elements in a list. I have implemented code (via an
activex
object) that dynamically updates the keyname of the context menu
extension in the registry, so that the context menu shows how far I
am
in the list (i.e. something like: 1 of 8, then 2 of 8, then 3 of 8,
etc). All this is working correctly, EXCEPT that to see the change, I
need to exit from Internet Explorer and restart it - i.e. its not
reloading the context menu extensions from the registry

Is there any way I can persuade Internet Explorer to reload the
context menu? Preferrable, this should be done from javascript. I am
working in internet explorer 6, naturally I would like a solution
that
supports 6 and upwards.
 
A

ari

You are trying to 'flush the registry buffers'. This happens when you restart
Explorer.
For example:http://www.codase.com/search/call?name=RegFlushKey
--
Mark L. Ferguson






- Show quoted text -

Hi Mark -

Thanks for the answer. I tried this, but unfortunately it didn't make
any difference.
The sequence of events is as follows:
- the user chooses an entry from the context menu (defined under
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt) which
is currently saying (for example) "get next entry (3 of 7)"
- this runs a javascript, which does what it does, and then runs an
activex object embedded in the form. This updates the registry,
changing the entry to "get next entry (4 0f 7)"
- if I open up regedit I see the value is updated in the registry
- but if I open the context menu again its still saying "3 of 7"
- if I close IE and reopen, it will say "4 0f 7"

one more piece of info: I'm using the CRegKey class, so I've been
using the "Flush()" method.
 
G

Guest

Since you don't plan to open another instance of IE, you might just avoid the
registry change of the 'MenuExt' Value altogether, and replace the
"oncontextmenu" event for that page. There may be a way to change the entry
somewhere in the dllcache copy of shdocvw.dll, but I don't know it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top