Microsoft KB Archive/193293

{|
 * width="100%"|

BUG: Changed System Policies Are Not Displayed on the Start Menu

 * }

Q193293

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), used with:
 * Microsoft Windows 98
 * Microsoft Windows 95
 * the operating system: Microsoft Windows NT 4.0
 * Microsoft Internet Explorer (Programming) versions 4.0, 4.01, 4.01 SP1

-

SYMPTOMS
When you enable or disable system policies that affect the Start menu, the Start menu does not reflect the policy change until you log off and log back on or you restart the system.

CAUSE
The Start menu information is cached, but the Start menu fails to flush certain items from its cache.

RESOLUTION
The only workaround for this bug is to log off and log back on.

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This bug is present in Windows 95 and Windows NT 4.0 with Internet Explorer 4.0x with the Desktop Update and Windows 98.

MORE INFORMATION
Adding or removing policies such as NoRun and NoFind should cause an update of the Start Menu the next time it is displayed. For example, if the NoRun policy is in force, the Start menu should not display the Run command. Despite this bug, the specific policy is enforced. For example, if you select Run while the NoRun policy is in force, a message appears telling you that you cannot perform the requested action.

This bug prevents the Start menu from being updated until the system is restarted or until you log off and log back on again.

For future compatibility, you should post the following message whenever a change to the system policies is made:

"PostMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0);" This will cause the shell to re-read any cached settings, including the system policies.

For non-policy change that affect the Start menu, such as adding a shortcut to the Start menu, you should call SHChangeNotify as shown below to cause the Start menu to update its contents:

Sample Code
  IMalloc *pMalloc;

if (SUCCEEDED(SHGetMalloc(&pMalloc))) {     LPITEMIDLIST pidl;

/*     You can also use CSIDL_COMMON_STARTMENU to get the Start menu for all users on Windows NT. */      if (SUCCEEDED(SHGetSpecialFolderLocation( (HWND)NULL,                                                CSIDL_STARTMENU,                                                &pidl))) {        SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_IDLIST, pidl, NULL);

// Free the PIDL returned by SHGetSpecialFolderLocation. pMalloc->Free(pidl); }

// Release the IMalloc interface. pMalloc->Release; }