1 頁 (共 1 頁)

修復更改 favorites路徑後,無法加入我的最愛的問題

文章發表於 : 2012年 1月 10日, 16:12
kaku
http://social.technet.microsoft.com/Forums/zh-TW/windowsvistazhcht/thread/e33e5ff5-ecbb-46c0-a2c1-7f55d7d31133

http://www.winhelponline.com/blog/unspecified-error-when-adding-a-link-to-favorites-in-windows-vista/

fix_fav_il.zip

'Script to fix [Unspecified Error] when adding Favorites in Internet Explorer
'© Ramesh Srinivasan. Created on June 04 2008
'Based on the original solution from MS-MVP Jimmy Brush
'Website: http://www.winhelponline.com
'Fix the Integrity level of the relocated Favorites folder
'http://www.winhelponline.com/blog/unspecified-error-when-adding-a-link-to-favorites-in-windows-vista/
Const FAVORITES = &H6&
Set objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objShell.Namespace(FAVORITES)
Set objFolderItem = objFolder.Self
strFavPath = objFolderItem.Path

If objFSO.FolderExists(strFavPath) Then
strFavPath = chr(34) & strFavPath & chr(34)
objShell.ShellExecute "CMD.EXE", "/K ICACLS " & _
strFavPath & " /setintegritylevel (OI)(CI)low", "", "runas", 1
Else
Msgbox "Destination folder " & strFavPath & " is not found."
end If

Set objShell = Nothing
Set FSO = Nothing