WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Start Menu - TaskBar

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Refresh the Start Menu

Keywords: start menu dllcall shortcut shortcutmake update startmenu 

Question:

There must be some kind of SendMessage or *something* to tell the start menu to refresh. When we add a bunch of icons and stuff to the start menu, the functions do not always "take" right away.

Is there some message we could send it ?

Answer:

Use the following code to refresh the Programs\WinBatch subfolder of the Start Menu:
mydir = strcat(ShortCutDir("Start Menu"),"Programs\WinBatch")
bb=BinaryAlloc(2048)
BinaryPokeStr(bb,0,mydir)
dllfile=strcat(dirwindows(1),"shell32.dll")
DllCall(dllfile, void:"SHChangeNotify", long:4096, long:1, lpbinary:bb, lpbinary:bb)
;Message("Debug",BinaryPeekStr(bb,0,200))
BinaryFree(bb)

Article ID:   W13329
Filename:   Refresh the Start Menu.txt
File Created: 2001:11:07:12:42:40
Last Updated: 2001:11:07:12:42:40