R
Robert Dadomo
Guest
Does anyone have a script whereby the My Music folder is omitted from the Folder Redirection policy. I found a vbscript:
' Variable Initilisations
Set objShell = CreateObject("WScript.Shell")
Set objNetwork = CreateObject("WScript.Network")
strUsername = objNetwork.UserName
sUser = objNetwork.username
strUserName = objNetwork.UserName
strRegKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Ex plorer\User Shell Folders\My Music"
strRedirectionPath = "%USERPROFILE%\Personal Data\My Music"
' Write the new Favorites path
objShell.RegWrite strRegKey, strRedirectionPath
' Variable Destruction
Set objShell = Nothing
Set objNetwork = Nothing
When I log in to test, I can see the registry key has been changed to '%USERPROFILE%\Personal Data\My Music'. However, when I navigate to 'My Music' in the My documents folder it still appears to be saving to the server and the name of the folder appears as '%s's Music'.
My main aim is to have a shortcut in the user's my documents folder, whereby they click the my music link and it goes to the users local profile.
Can anyone help me?
Many Thanks
Can any kind soul help me to where I'm going wrong?
Many thanks
Robert
' Variable Initilisations
Set objShell = CreateObject("WScript.Shell")
Set objNetwork = CreateObject("WScript.Network")
strUsername = objNetwork.UserName
sUser = objNetwork.username
strUserName = objNetwork.UserName
strRegKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Ex plorer\User Shell Folders\My Music"
strRedirectionPath = "%USERPROFILE%\Personal Data\My Music"
' Write the new Favorites path
objShell.RegWrite strRegKey, strRedirectionPath
' Variable Destruction
Set objShell = Nothing
Set objNetwork = Nothing
When I log in to test, I can see the registry key has been changed to '%USERPROFILE%\Personal Data\My Music'. However, when I navigate to 'My Music' in the My documents folder it still appears to be saving to the server and the name of the folder appears as '%s's Music'.
My main aim is to have a shortcut in the user's my documents folder, whereby they click the my music link and it goes to the users local profile.
Can anyone help me?
Many Thanks
Can any kind soul help me to where I'm going wrong?
Many thanks
Robert