Announcement

Collapse
No announcement yet.

Setting up and Mapping Network Drives (Part 2)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting up and Mapping Network Drives (Part 2)

    Hi guys. I'm new here, and a newbie to Windows servers so I need your help.

    I set up a Windows 2000 network, at a college I work in, and I set up a shared network drive for the users (students). It was a good start, for a beginner, but I realise that I need to do more than that. Because the drive is shared, the students will see each other's work. I want to set it up in such a way that each student has his/her own network drive, and can only see his/her files.

    I could take the long cut, where I create a shared folder for each student, create a logon script for each student (using the NET USE command), and put in the name of the student's logon script in each student account's Properties>Profile tab.

    This is the long cut. I'm expecting 100 students this term. This would mean I create a hundred folders, a hundred logon scripts, and typing in the hundred logon scripts in the hundred student account's Properties>Profile tab.

    I need to find a way of automating the folder creation and drive mapping.

    How can I do it,guys?Don't get too deepI'm new to this whole thing!

    Any help would be highly appreciated.
    Last edited by biggles77; 7th January 2008, 14:19. Reason: Inserted spaces in punctuation for easier reading.

  • #2
    Re: Setting up and Mapping Network Drives (Part 2)

    Okay,guys,I found something.

    It's a VBScript that maps network drives using usernames.I created a shared folder called Home,and then created subfolders for users within it,using the students logon account names.But I have a small problem,and I trust you guys can figure it out.

    Here's the script (I'll acknowledge the owner since I didn't write it myself):



    ' MNDUserName.vbs
    ' VBScript to map a network drive to the UserName.
    ' Author Guy Thomas http://computerperformance.co.uk/
    ' Version 1.3 - April 24th 2005
    ' -----------------------------------------------------------------'
    Option Explicit
    Dim objNetwork
    Dim strDriveLetter, strRemotePath, strUserName
    strDriveLetter = "Q:"
    strRemotePath = "\\server\home"

    ' Purpose of script to create a network object. (objNetwork)
    ' Then to apply the MapNetworkDrive method. Result J: drive
    Set objNetwork = WScript.CreateObject("WScript.Network")
    ' Here is where we extract the UserName
    strUserName = objNetwork.UserName
    objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _
    & "\" & strUserName

    ' Extra code just to add a message box
    WScript.Echo " Launch Explorer, check: "& strDriveLetter
    WScript.Quit

    ' End of MapNetworkDrive Example logon script.


    Owner's right there at the beginning.

    For the network drive to appear,I have to double-click on the script.It works perfectly fine,except the network drive does not re-connect at logon.I have to double-click on the file everytime after logon for the network drive to appear.

    What am I missing?What can I do to make the drives to re-connect at logon everytime?If there's any code I need to add please insert it within the script.

    Thanks guys!!

    Comment


    • #3
      Re: Setting up and Mapping Network Drives (Part 2)

      Insert a CALL command for the VBS script in the Login script.

      What client operating system is used by the students? If NT, Windows 2000 or XP, why not set the Home Folder driver letter in the User account Properties. No need to map the home folder in a script then.

      How are you planning on adding the students? Script or manually?

      Click image for larger version

Name:	home-folder.jpg
Views:	1
Size:	39.6 KB
ID:	463418

      Also, please use the spacebar to make little gaps between a fullstops (.) and commas (,). It makes for easier reading. Thanks.
      1 1 was a racehorse.
      2 2 was 1 2.
      1 1 1 1 race 1 day,
      2 2 1 1 2

      Comment


      • #4
        Re: Setting up and Mapping Network Drives (Part 2)

        Way to go!You rock!You saved me!!

        I can't believe how much i've learnt within a week of being on this site.Thanks guys!

        Client machines run XP.I wanted to add the students using a logon script,but what I have so far(that logon script plus the tip you gave me),i can get survive.I just need to get around,that's all.I'll go deeper with time,since I'm beginning to really study servers.I gotta crawl first,you know what I'm saying?

        Network drives connect,I set up disk quotas and I'm up and running.

        I created an OU,and a policy for it.I configured the policy to hide C: drive and prevent writting to it,but somehow I can still see it and write to it using the user accounts in the OU.

        Or this is another thread all on its own?


        Originally posted by biggles77 View Post
        Insert a CALL command for the VBS script in the Login script.

        What client operating system is used by the students? If NT, Windows 2000 or XP, why not set the Home Folder driver letter in the User account Properties. No need to map the home folder in a script then.

        How are you planning on adding the students? Script or manually?

        [ATTACH]1920[/ATTACH]

        Also, please use the spacebar to make little gaps between a fullstops (.) and commas (,). It makes for easier reading. Thanks.

        Comment

        Working...
        X