PDA

View Full Version : Adding favorites


G Mills
10-08-2004, 07:18 AM
Is there a global variable for the user's Favorites folder? If not then is there any way to copy files to the current user's profile?

I have found the _UsePerUserFolders variable but this is just a toggle variable so I can't use this to copy files to the current user's profile as I was hoping to.

Any ideas?

Brett
10-08-2004, 08:52 AM
Here is a function to find the Favorites folder:


function GetFavoritesFolder()
local strReturn = "";
-- "Explorer" should be all together below. For some reason this BBS breaks it up.
local strKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Expl orer\\User Shell Folders";

strReturn = Registry.GetValue(HKEY_CURRENT_USER,strKey,"Favorites",true);

return strReturn;
end


To test it, put it in your On Startup project event followed by:

Dialog.Message("Favorites Folder", GetFavoritesFolder());

G Mills
10-08-2004, 09:01 AM
That worked perfectly. Thanks alot!!!