Saturday, April 4, 2009

Internet Explorer Favorites - Menu Order

It's always iritated me when I went to a new workstation and copied my favorites over that the order wasn't saved, even more it iritated me that IE doesn't have some way of saving this for us.

So... Save your favorites including the order that they appear in Internet Explorer (v7) with ease.

Create a new .vbs file and place the following in it.


'Set Favorites Backup Folder
strFolder = "C:\FavoritesBackup"
set
objFSO = createobject("Scripting.FileSystemObject")
if
objFSO.FolderExists(strFolder) = False then
objFSO.CreateFolder strFolder
wscript.echo "Folder Created"
end if

'Set Userprofile location
Set oShell = CreateObject("Wscript.Shell")
strUserProfile = oShell.ExpandEnvironmentStrings("%USERPROFILE%")

'Copy favorites from profile
Const OverWriteFiles = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFolder strUserProfile & "\Favorites" ,
"C:\favoritesbackup\Favorites" , OverWriteFiles

'Export Registry Key
strCommand = "regedit /e c:\favoritesbackup\FavoritesMenuOrder.reg
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites"
set objWshShell = WScript.CreateObject("WScript.Shell")
intRC = objWshShell.Run(strCommand, 0, TRUE)
if intRC <> 0 then
WScript.Echo "Error returned from exporting
registry: " & intRC
else
WScript.Echo "No errors returned from exporting
the registry file"
end if


Save and double click the vbscript you just created.

The registry key can also be obtained for non-logged in users by connecting to the users hive and exporting the key, just remember that it will export with the connection name so that will have to be updated for import.

Import reg key on the new computer after copying favorites icons to the new computer profile.

No comments:

Post a Comment