User Folders - Moving User Folders by Modular Script

    User Folders - Moving User Folders by Modular Script

    User Folders - Moving User Folders by Modular Script

    Choose the folders to move,their destination,and just run the script
    Published by
    Designer Media Ltd


    Hi All,

    This script was initially made in French by Alain Quarré, the author.
    I found it,lot of people too, very convenient and easy to handle
    so I asked the author for an english version,he kindly accepted to do
    the changes and agreed that I post it in this forum
    You can read his original post at Déplacer Mes Documents par défaut et par script : Personnalisation de Windows (in french)
    All credits and thanks goes to him of course !

    WARNING : This script don't apply any changes to the CURRENT USER !!
    but only for the next ( and other created account(during activation)
    This script is totally free,you can copy,modify and publish it
    But using it will be at your own risks (there is none so far )



    TIP : Best use of this script will be on a new or re-install of Seven

    1) During install and when prompted to, choose a fake user name i.e. "test"
    2) When Seven is first launched and ready,run the script ( NECESSARILY with administrator rights)
    3) create a new user account with the good name this time,open a session with it and see that the folders you
    defined are at the right place with the good and only junctions
    4) "Test" account can, now be deleted !
    That' all...Folks

    How to make so that the users files are where one wants :

    Lot of tutorials on the Net will show you how to move the files My Documents, My Images, Downloads, My Vidéos,…
    Nevertheless, the most explained method (right click, properties, new placement,…) brings a problem.
    This problem is related to the Junctions created at the time of the activation of the user account.
    The junctions are there to redirect the writings on, for example, My documents If you move My Documents by right click, properties,...
    My Documents will be,indeed, at the new place. But, in the User Folder, there will be always a junction " My Documents "
    which will always point to the old place.

    Move your files My Documents, then, note the state of the junctions
    to verify, in a prompt command, type :
    Code:
    dir "%userprofile%" /AL
    the junction still point to the original place
    To be sure,in same window type :
    Code:
    dir c:>"%userprofile%\Mes Documents\test.txt"
    Look for test.txt, you will find him in old folder: C:\Users\%username%\Documents

    very annoying,not to forget,that all moves must be done manually for all users
    actual and to come

    This script modify the "Default User" settings,as "Default User" is the model for new users
    the changes are made in Seven in this folder : C:\Users\Default\NTUSER.DAT

    After running the script,every new user will have his folders at the choosen place
    and on first connexion, an other script ( automated ) will create the new junctions
    that will point,this time,to the right place

    the script to run is : PositionDefaultFolderSevenModular.cmd, necessarily with ADMINISTRATOR's RIGHTS !
    The default choosen folder place is : D:\Documents\
    If this place suits you than just hit Enter and let the script finish
    To choose a specific folder place, you must edit the PositionDefaultFolderSevenModular.ini
    the script will test the destination to match, before running !

    Modular Script :
    Modularity on :
    the folders to move
    The destination
    If needed sub-folder per user or not
    If needed to hide the destination folder

    This script can move these folders :

    My Documents
    My Pictures
    My Vidéos
    My Music
    Desktop
    Favorites
    History
    Templates
    Downloads
    Saved Games
    Contacts
    Searches
    Cookies
    Links
    Temporary Internet Files
    CD Burning

    In order to custom the script, you have to edit the PositionDefaultFolderSevenModular.ini
    This is the original one :

    Code:
    My Documents*Personal*AddUserName*Security*Documents*D:\Documents
    My Pictures*My Pictures*AddUserName*Security*Pictures*D:\Documents
    My Videos*My Video*AddUserName*Security*Videos*D:\Documents
    My Music*My Music*AddUserName*Security*Music*D:\Documents
    Desktop*Desktop*AddUserName*Security*Desktop*D:\Documents
    Favorites*Favorites*AddUserName*Security*Favorites*D:\Documents
    Templates*Templates*AddUserName*Security*Templates*D:\Documents
    Downloads*{374DE290-123F-4565-9164-39C4925E467B}*AddUserName*Security*Downloads*D:\Documents
    Saved Games*{4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4}*AddUserName*Security*Saved Games*D:\Documents
    Contacts*{56784854-C6CB-462B-8169-88E350ACB882}*AddUserName*Security*Contacts*D:\Documents
    Searches*{7D1D3A04-DEBB-4115-95CF-2F29DA2920DA}*AddUserName*Security*Searches*D:\Documents
    Links*{BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968}*AddUserName*Security*Links*D:\Documents
    Cookies*Cookies*AddUserName*Security*Cookies*D:\CacheFolder*Hide-Sys
    History*History*AddUserName*Security*History*D:\CacheFolder
    Temporary Internet Files*Cache*AddUserName*Security*Temporary Internet Files*D:\CacheFolder
    CD Burning*CD Burning*NoUserName*NoSecurity*Burn*D:\CacheFolder\Burn
    Every line is specific of the folder to move
    Every line contains 7 fields separated by *

    Local name
    Registry Value Name
    AddUserName or NoUserName
    Security or NoSecurity (Not used)
    Sub-Folder Name
    Move-to Position (NO BACKSLASH @end)
    (Optional) "Hide-Sys" The moved folder will be system and therefore hidden

    Only fields 3, 4, 6, 7 can be customized
    Place the sign " smaller than " (<) at the beginning of the lines of the folder that you do not wish to move.

    Enjoy:)

    Downloads : http://www.gopc.be/Alain/PositionDef...Modular-ML.rar







  1. Posts : 51
    Windows 7 Home premium x64
       #1

    I'm using this script about 7 months now and it works great.. Thank you!!!

    However it seems to create a strange error in add/remove locations in a library folder... The default folder of documents in my example is referred that it is "not responding" (in add/remove folders in library dialog). However I can access this folder from the library and cannot find where the error is referred to.

    If I remove the folder end add again manually the error message disappears. NO VISIBLE ERROR at all. And NO problems with personal folders It is working like it is meant to work with last ones.

    Edit: Added picture (sorry for Greek... I own home premium... cannot change language).

    At the top says library locations. In the bottom is common videos folder and at the left of the same folder says "not responding" but I cannot understand the real problem. The folder is accesible....
    Attached Thumbnails Attached Thumbnails User Folders - Moving User Folders by Modular Script-library-locations.png  
    Last edited by stsaerox; 01 Aug 2011 at 16:38.
      My Computer


  2. Posts : 42
    Win7 Ult x64
       #2

    @Pepito Thanks for translating the initial post from French!

    They have been changes made as noted in the French language thread:
    http://www.forum-seven.com/forum/topic4073.html

    Most importantly, the French only and Multilingual versions of the script are no longer being updated.

    The "ML-S" version is the only that is being updated. The latest at time of this post is ver 4.3 (2011-07-27).

    Google translation
    Multilanguage version with security management files:
    Here is the version incorporating the safety of the destination folders.
    Future changes will only be made to this version.
    By default, all files moved, except My Music, are inaccessible to other users not administrators


    http://www.quarre.be/alain/Scripts/P...dular-ML-S.rar
    Here's a Google translation is what is posted concerning the version changes.
    NOTE: I've enlcosed in brackets "[]" my edits of the translation.
    [Change] 29/11/2010
    Integration of security management files.
    By default, user folders are only accessible by the user himself and the members of the Administrators group.
    [When you only move a user's folders] security is being inherited from the destination folder.
    [Then you have the problem] that all users have full rights to all files ...
    With the script, the [security and permissions] will be the same as the original locations.

    PositionDefaultFolderSevenModular.ini file, if the field is AddUsername 3 AND 4 is the field Security,
    the following security settings are applied to the relevant files:

    • Applications of all rights to the user. (+ Inheritance)
    • Remove inherited rights
    • Applications of all rights to the account system (+ inheritance)
    • Applications of all rights to the Administrators group

    Note: By default, and as for junctions, Windows does not apply to files moved the original security.
    [But] the script now does!

    [Change] 27/07/2011
    Changing the script Jonctions.cmd
    Added variable %USERDOMAIN% for the application of safety issues.
    The absence of this variable was a problem of access to the Temporary Internet Files folder to a user domain.
    See the script jonctions.cmd on line 156
    In addition, the following Version History can be found in the "INFO.txt" (French), dated 2011-07-27, contained with the latest "ML-S" rar. Here's the Google translation:
    News release:
    =============
    V1 in November 2007. Script for XP
    V2 in January 2010. Seven script - Vista
    V3 in March 2010. Complete modularity for Seven Script - Vista
    V4.0 October 2010. Change language to manage multi
    V4.0.1 Added a test that the script can not run from a moving target folders
    V4.1.beta Added security management files. Full rights for System and% username%. November 22, 2010
    V4.1.1.beta Added security management files. Full right to the Administrators group. November 23, 2010
    V4.2 Added folder for virtual machines. May 28, 2011
    V4.3 Added the %USERDOMAIN% in the implementation of security on file by the script Jonctions.cmd
    Currently there are 30 pages in that thread with lots of very good information.

    There is one thing that is not done by this modular script that might be important: moving the Public folder.

    Fortunately, Alain has another script that handles that. The link to the French thread is listed in the INFO.txt file contained in the rar.
    Here's a Google translation:
    Information about this script:
    http://www.forum-seven.com/forum/topic4396.html

    To ensure the smooth running of this script,
    it is advisable to restart your PC and run this script directly in administrator mode.

    After running this script, the connections to the public folder in the library to be built to date.
    (only for users already on the PC. The future users will have their libraries correct)

    The script:
    MovePublicFolder
    - Changes the position of the Public folder in the registry.
    - Move the contents of the public.
    - Created the junction points ensuring the proper monitoring records to the new location
    - Close the session
    Last edited by Brink; 30 Jan 2012 at 10:50. Reason: merged
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:43.
Find Us