WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Change Explorer Favorites Location

Keywords: 	  explorer favorites

Question:

Below is some code that I took from the examples and modified to see if I could change the location that explorer saves its favorites. I am having trouble getting to the key to modifiy it. Ideally I would like to be able to look at it and see its value and if the value is wrong set it to the new value. Below is as far as I got. has got any code snipits that do this ?

This is the key that I got from regedit:

	HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
As a sub to this key there is the value “favorites” and the data that is the file location. This was my unsuccessful attempt to get the value:
	key=RegOpenkey(@REGCURRENT, "Software\Microsoft\Windows\CurrentVersion\Explorer\ShellFolders\favorites")
	who=RegQueryKeys(key)
	who=StrReplace(who,@tab,@crlf)
	RegClosekey(key)

Answer:

;Define key name
keyitem=Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders[favorites]"

;Look at item
where=RegQueryValue(@REGCURRENT,keyitem)
Message("Old Value",where)

newwhere="C:\TEMP"
RegSetValue(@REGCURRENT,keyitem,newwhere)
You may need to restart explorer ot maybe even reboot for this change to take effect.
Article ID:   W13133
Filename:   Change Explorer Favorites Location.txt
File Created: 1999:04:15:16:51:58
Last Updated: 1999:04:15:16:51:58