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

ID: Q193293

The information in this article applies to:

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();
      }

REFERENCES

For additional information on system policies, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q151176
   TITLE     : Policy Registry Entries (Default User)

Additional query words:
Keywords          : kbNTOS400bug kbSDKPlatform kbGrpUser kbWinOS95bug kbWinOS98bug 
Issue type        : kbbug
Solution Type     : kbpending

Last Reviewed: September 28, 1998