#SingleInstance force #NoTrayIcon #NoEnv RegRead, FavoritesFolder, HKCU , Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Favorites ;__________________________________________________________ IconsFolder = %FavoritesFolder%\_icons ;path to icons ;__________________________________________________________ TotalFavs = 0 NoIcon = 0 i = 0 Loop, %FavoritesFolder%\*.url,,1 { TotalFavs++ SplitPath, A_LoopFileName,,,, NoExt IfExist, %IconsFolder%\%NoExt%.ico { FileGetAttrib, readonly, %A_LoopFileLongPath% IfInString, readonly, R readonly = 1 Else readonly = 0 IniRead, value, %A_LoopFileLongPath%, InternetShortcut, IconFile If value != %IconsFolder%\%NoExt%.ico { If readonly { FileSetAttrib, -R, %A_LoopFileLongPath% readonly = 0 } IniWrite, %IconsFolder%\%NoExt%.ico, %A_LoopFileLongPath%, InternetShortcut, IconFile } IniRead, value, %A_LoopFileLongPath%, InternetShortcut, IconIndex If value != 0 { If readonly { FileSetAttrib, -R, %A_LoopFileLongPath% readonly = 0 } IniWrite, 0, %A_LoopFileLongPath%, InternetShortcut, IconIndex } If readonly = 0 { i++ FileSetAttrib, +R, %A_LoopFileLongPath% } } Else NoIcon++ } MsgBox, 64, FavIcons Editor , %TotalFavs%%A_Tab%total favorites.`n%i%%A_Tab%favicons updated.`n%NoIcon%%A_Tab%favorites without icons.