xp 升级到sp2后 addFavourite, ImportExportFavorites, 都不工作, 错误信息为: Permission denied 和 Object does not support this action.
在之前的版本都没有任何问题.

解决方案 »

  1.   

    http://tech.sina.com.cn/it/2004-03-08/0745301906.shtml
      

  2.   

    http://support.microsoft.com/?kbid=241362
      

  3.   

    http://support.microsoft.com/?kbid=241362
    这个应该是 对 IE5 到 IE6 有影响啊, 何况我以前在 SP1, IE6 的情况下是可以用的.
    This vulnerability only affects Windows 95-based, Windows 98-based, Windows 98 Second Edition-based, and Windows NT 4.0-based computers that are connected to the Internet and that are using Internet Explorer 5.0 with Active Scripting enabled. 
    而且是在程序中调用, 并不是在web 页面中.
      

  4.   

    似乎和XPSP2的策略有关
    What existing functionality is changing in Windows XP Service Pack 2?Methods: window.open(), window.external.navigateAndFind(), showHelp()
    Detailed descriptionIn the Internet zone, the Pop-up Blocker blocks windows that are automatically opened by these methods without the user clicking a link. Windows that are opened by these methods by clicking a link might also be blocked if the customer has enabled the more restrictive blocking setting.If a function normally returns a window object, then the function will return null when a window is blocked. Web developers can check for null to determine whether the window they attempted to open was blocked.Windows that are outside the viewable screen when they are opened are positioned onto the viewable area.Windows that are larger than the viewable screen when they are opened are resized to the viewable area.For more information, see “Internet Explorer Window Restrictions” in this document
      

  5.   

    IE的window.external就是IShellUIHelper
      

  6.   

    是的. sp2  的 IE 的external 是可以工作的. 关键是现在, 如果自己编的浏览器, 就不能使用 ShellUIHelper, 即使你用 Dim sh as new SHDOCVW.ShellUIHelper 也会报错 The specified module cannot be found. 但是我自己的浏览器控件并没有 implement IShellUIHelper, 所以我不能用 queryInterface 来得到.
      

  7.   

    我看到另外一片文章. 但是都没有提到运用 SHDOCVW 的问题. 都是说的IE的问题.In Windows XP Service Pack 2, all local files and content that is processed by 
                                  *** ***** ***** *** *******
    Internet Explorer has additional security applied to it in the Local Machine zone.
    When Internet Explorer runs in the Local Machine zone, the default security settings for the security zones, known as URLActions, are overridden by settings that are even more restrictive than those of the Internet zone. Specifically, these settings are:URLACTION_ACTIVEX_ RUN resolves to Disallow. 
    URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY resolves to Disallow. 
    URLACTION_SCRIPT_ RUN resolves to Prompt. 
    URLACTION_CROSS_DOMAIN_ DATA resolves to Prompt. 
    URLACTION_BINARY_BEHAVIORS_BLOCK resolves to Disallow. 
    URLACTION_JAVA_PERMISSIONS resolves to Disallow. This change helps stop malicious HTML that finds its way onto users' computer from elevating privilege. Code with such elevated privilege can then run any code through an ActiveX control or by reading information with script.
      

  8.   

    对不起我收回 Dim sh as new SHDOCVW.ShellUIHelper 也会报错 The specified module cannot be found 这句话, 这是因为注册表的原因.
    但是问题还是依旧, addFavourite, ImportExportFavorites, 都不工作, 错误信息为: Permission denied 和 Object does not support this action.
      

  9.   

    怎么会这样哎.net的优势就在与兼容各种Windows系统,而VB虽然开发方便,但系统依赖性太强
      

  10.   

    虽然VB不是最好的解决办法, 但是 就算是 VC++ 也不可以用 ShellUIHelper啊, 在 sp2 用 CoCreateInstance 创建的 pShellUIHelper 得到的pointer是空的...
      

  11.   

    Sorry, 又错了... 得到的 不是空 pointer 但是 也不可以用 ImportExportFavorites.
      

  12.   

    Permission denied 和 Object does not support this actionVB对系统的依赖性太强了,应该是SP2对IE的新的安全机制的问题。
      

  13.   

    谢谢这么多人的 回复, 不过我相信这个不是 VB的问题, 就算是用VC++ 来做同样的事情也不可以成功, 我觉得是很可能 微软修改了 ImportExportFavorites 的调用方式...