Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Logon script question

Options
  • 16-02-2004 1:56pm
    #1
    Registered Users Posts: 10,339 ✭✭✭✭


    I know how to run logon scripts for mapped drives etc but I'm not sure if this problem would be solved the same way.

    If you right click on the MY DOCUMENTS folder on the desktop and select MOVE you can redirect the default save directory to a server drive - in this case the Users home folder on the server (reason for this is because I want the documents included in the nightly backup without having ot leave the client running).

    Now, if the PC gets a wipe and reinstall at any stage, there is a possibility that the folder on server would be forgotten and all documents would look like they were gone. So, what I would like to do is add to a login script some sort of checker that tests the path to the my documents folder and if it is not pointing at the home folder it resets it.

    clear as mud?


    Any ideas or suggestions where to look? I've tried google but it just returns mapped drive settigns etc.


Comments

  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,886 Mod ✭✭✭✭Capt'n Midnight


    In usermanger there should be a setting for Home Directory


    To look for a folder check for files in it - in login script you can have a
    if not exist x:\*.* net use x: \\server\%username%$

    net use x: "\\server\%username%$" --- if there is a space in the name

    %username% does not work in win9x (could add to autoexec etc.)


  • Registered Users Posts: 10,339 ✭✭✭✭LoLth


    thanks,

    but how do I get it to check that the My documents shortcut (on the PC) points to the server now instead of the C: drive? and if it is not pointing at the server, to change it automatically to \\server\user folder\documents..

    come to think of it, it probably doesnt even need to check, just needs to set the shortcut path.


  • Registered Users Posts: 651 ✭✭✭sirlinux


    You set the my document location through a group policy in the active directory. Ill give more details if you want.


  • Registered Users Posts: 10,339 ✭✭✭✭LoLth


    more details would be most appreciated indeed :)


  • Registered Users Posts: 651 ✭✭✭sirlinux


    To redirect every users My Documents folder:

    1. Logon to a domain controller as a member of the Domain Admin group.

    2. Start / Run / MMC / OK.

    3. Console / Add/Remove Snap-in.

    4. Add the Group Policy snap-in.

    5. Select the Default Domain Policy.

    6. User Configuration / Windows Settings / Folder Redirection.

    7. Right-click My Document and press Properties.

    8. Press Basic.

    9. In the Target Folder Location box, type the path as \\ServerName\ShareName\%username%.


    have a read off

    http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/windowsserver2003/proddocs/entserver/gpx_redirectHome.asp
    http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/Folder.htm
    http://www.jsiinc.com/SUBF/TIP2700/rh2771.htm


  • Advertisement
  • Registered Users Posts: 10,339 ✭✭✭✭LoLth


    thanks,

    exactly what I was looking for.


    hmm, hangover does indeed affect your googling skills!


  • Registered Users Posts: 651 ✭✭✭sirlinux


    A known side effect of this policy is that you get error messages in the clients event log saying "failed to create directory %username%" it's a pretty silly one as once the directory is created it cant be remade, apart from that it works fine, it should show up if your group policies are working ok. Do it last thing at night,and by the morning all your users will have their "my docs" networked, im guessing you have enough network capacity and storage to deal with all the extra traffic this may cause. You might consider making the folder available offline (though this often causes more trouble then it's worth but can slightly reduce traffic).


Advertisement