midiboy Posted October 30, 2007 Posted October 30, 2007 Hi guys !I am trying to find the location of the users Desktop folder in Windows Vista. Querying the registry like in Windows XP does not work anymore. In XP I used this:FOR /F "TOKENS=3 DELIMS= " %%i in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Desktop') do set DESKTOP=%%iNow the registry value is still there but it still does not work. Also, the registry contained a value that said"Do not use these Registry values, use SHGetKnownFolderPath or SHGetFolderPath instead."So I tried to look up this function on MSDN but since I am no programmer I am not able to use that to my satisfaction in a cmd or vbs. Thats the link:FunctionCan anyone help me out by explaining how I could use this function from inside a cmd ?Thanks a lot !Alex
midiboy Posted October 31, 2007 Author Posted October 31, 2007 Hi again,well, I did not find out how to use that function yet but I managed to find out the reason why the mentioned code did not work. The DELIM in Windows XP was a <TAB> key, in Vista it has to be a <SPACE> Key.Does anyone know how to change special user folders like Documents, Music, Videos etc. to another path using a cmd or vbs in the same way as doing it manually in Explorer (if you do it in explorer you are being asked if you want to move the files over to the new place, then the old folder is deleted and the new one is created)Thanks,Alex
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now