+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
Windows Thread, Redirecting My Pictures/My Music Folder in Technical; is should do yes, try saving something in there and see if it saves on the computer or on the ...
  1. #16

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,043
    Thank Post
    888
    Thanked 1,727 Times in 1,490 Posts
    Blog Entries
    12
    Rep Power
    453
    is should do yes, try saving something in there and see if it saves on the computer or on the server.

    Did you use it as a login script?

  2. #17

    Join Date
    Sep 2006
    Location
    London
    Posts
    31
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by FN-Greatermanchester View Post
    is should do yes, try saving something in there and see if it saves on the computer or on the server.

    Did you use it as a login script?
    I just have and it saves on the server.

    I did use it as a login script. I created a GPO in User Configuration | Windows Settings |Scripts | Logon

    The VBS file is in the correct folder.

  3. #18

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,043
    Thank Post
    888
    Thanked 1,727 Times in 1,490 Posts
    Blog Entries
    12
    Rep Power
    453
    what happens if you run it manually?

    Z

    Edit: I might know the problem, the registery doesnt know what to do with the " & SUser & ". Try changing it with a folder in the C drive to test it. Then save something and see it it saves in that folder.

  4. #19


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,692
    Thank Post
    352
    Thanked 797 Times in 716 Posts
    Rep Power
    347
    You could use %USERNAME% which is how we reference things in our login scripts.

  5. #20

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,223
    Thank Post
    874
    Thanked 2,717 Times in 2,302 Posts
    Blog Entries
    11
    Rep Power
    780
    When you redirect them using the regestry it will not copy or move the files automatically they will have to be moved manually or by a script to the new location. You may be able to make a group policy adm template to be able to redirect without using a script if you want to, more information here:
    Stop certain folders propagating to the server from laptops.

  6. #21

    Join Date
    Sep 2006
    Location
    London
    Posts
    31
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi,

    Sorry have not really had a chance to look into this since last post, have only started getting back onto this again.

    Just to confirm what I've done.

    I am using the vbscript below:

    ' 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 Pictures"
    strRedirectionPath = "%USERNAME%\Personal Data\My Pictures"

    ' Write the new Favorites path
    objShell.RegWrite strRegKey, strRedirectionPath

    ' Variable Destruction
    Set objShell = Nothing
    Set objNetwork = Nothing

    I have created a GPO whereby this script runs at logon. At present the result I am getting is that:

    When I look in regedit: the registry key has been changed for my pictures to:

    %USERNAME%\Personal Data\My Pictures

    However, when I go into the users 'My documents folder' the My Pictures folder now appears as '%s's pictures'. This is still being directed to the server, not the local user profile. If I save a file manually inside this folder it still appears on the server.

    Does anyone know what's going wrong?

    Many Thanks

    Robert

  7. #22

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,223
    Thank Post
    874
    Thanked 2,717 Times in 2,302 Posts
    Blog Entries
    11
    Rep Power
    780
    Umm shouldn't it be something like

    strRedirectionPath = "C:\Documents and Settings\" & sUser & "\Local Settings\Personal Data\My Pictures"

    as at the moment the path would go to nowhere

  8. #23

    Join Date
    Sep 2006
    Location
    London
    Posts
    31
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by SYNACK View Post
    Umm shouldn't it be something like

    strRedirectionPath = "C:\Documents and Settings\" & sUser & "\Local Settings\Personal Data\My Pictures"

    as at the moment the path would go to nowhere
    does it understand " & sUser & "? I've never heard of it before

  9. #24

    Join Date
    Sep 2006
    Location
    London
    Posts
    31
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by robbied69 View Post
    does it understand " & sUser & "? I've never heard of it before
    Actually I've seen that it works.

    However, it is still not saving in the relevant place, even though the registry is pointing to the new place.

    I don't know if its a problem. But under the type column, for all other reg keys the word 'REG_EXPAND_SZ' appears, whereas the key for this is 'REG_SZ'.

    Does anyone know if this will cause an issue?

    Thanks

  10. #25

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,223
    Thank Post
    874
    Thanked 2,717 Times in 2,302 Posts
    Blog Entries
    11
    Rep Power
    780
    Quote Originally Posted by robbied69 View Post
    Actually I've seen that it works.

    However, it is still not saving in the relevant place, even though the registry is pointing to the new place.

    I don't know if its a problem. But under the type column, for all other reg keys the word 'REG_EXPAND_SZ' appears, whereas the key for this is 'REG_SZ'.

    Does anyone know if this will cause an issue?

    Thanks
    The & sUser & bit is actually running in VBScript rather than the regestry so all the registrey sees it the appropriate data.

    The difference between 'REG_SZ' and 'REG_EXPAND_SZ' is that the first will not expand environment variables like %USERNAME% where as the latter will. If the value is right this should not have any effect on your script as it expands the variable beforehand in VB.

  11. Thanks to SYNACK from:

    robbied69 (11th September 2008)

  12. #26

    Join Date
    Sep 2006
    Location
    London
    Posts
    31
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by SYNACK View Post
    The & sUser & bit is actually running in VBScript rather than the regestry so all the registrey sees it the appropriate data.

    The difference between 'REG_SZ' and 'REG_EXPAND_SZ' is that the first will not expand environment variables like %USERNAME% where as the latter will. If the value is right this should not have any effect on your script as it expands the variable beforehand in VB.
    Thanks for your help. I seem at a complete dead end. I've even written a custom adm, and it changes values to the same as the script. It is changing in the registry. But when navigating via the folder structure, my pictures and my music appear to be stored on the server.

  13. #27
    Rozzer's Avatar
    Join Date
    Aug 2005
    Location
    South West
    Posts
    720
    Thank Post
    21
    Thanked 81 Times in 61 Posts
    Rep Power
    33
    Hello,

    I have also been looking into redirecting My Music. Its quite frustrating and tricky and something i was never able to do. I wanted to redirect the my music to the root of the local drive. But after many hours no luck

    Ross

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Redirecting My Music in XP/2k3 Environment
    By BKGarry in forum Windows
    Replies: 7
    Last Post: 7th May 2008, 08:07 PM
  2. Redirect My Pictures
    By Newton in forum Windows
    Replies: 4
    Last Post: 14th April 2008, 09:26 AM
  3. Pictures from the show
    By Ric_ in forum BETT 2014
    Replies: 13
    Last Post: 18th January 2008, 11:32 PM
  4. Redirecting Fonts system folder to a network share.
    By markwilliamson2001 in forum Windows
    Replies: 5
    Last Post: 18th January 2008, 03:02 PM
  5. Redirecting applications save folder
    By Wizzer in forum How do you do....it?
    Replies: 14
    Last Post: 22nd November 2006, 12:46 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •