+ Post New Thread
Results 1 to 3 of 3
Windows 7 Thread, Class selector - map network drive at logon in Technical; 30 laptops, shared between Year 1 and Year 2 classes (Infant School) Laptops not on a domain - a project ...
  1. #1

    Join Date
    May 2009
    Location
    Surrey
    Posts
    15
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Class selector - map network drive at logon

    30 laptops, shared between Year 1 and Year 2 classes (Infant School)
    Laptops not on a domain - a project for another time.

    When the laptop is switched on it logs straight into a standard pupil user profile and Maps the root of the Children's shared drive (NAS).
    This all works fine and the laptops are pretty stable. The only concern at the moment is the children are struggling to carefully navigate to their Class folder, then into a 'topic' folder... e.g.
    The sometimes end up 'accidentally' moving an entire folder into another one, which is hilarious the first time it happens, but then it gets a little tiring - The Mystery of the Missing Folder.

    Apple Class
    Banana Class
    Pear Class
    |_____ Animation
    Strawberry Class

    I thought of creating a BATCH file at logon to prompt for the class they belong to, and map that particular shared folder...
    It would be nicer as a GUI if anyone has done something like this before (like RM Class Selector)

    Your thoughts/help would be much appreciated.

  2. #2


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,708
    Thank Post
    229
    Thanked 870 Times in 747 Posts
    Rep Power
    298
    I need a VB Script to Map a Drive have a look at the last post

  3. Thanks to sted from:

    mrwoberts (1st February 2014)

  4. #3

    Join Date
    May 2009
    Location
    Surrey
    Posts
    15
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Lightbulb A possible solution

    Thanks sted, I like command line scripts.

    I've been trawling the net and adapted a solution I found here.

    Created a new text file with name MapHomeDrive.HTA
    Code:
    <HTML>
    <HEAD>
    <TITLE>Map drive M: to Class Folder</title>
    <HTA:APPLICATION
         ApplicationName="MapClassFolder.HTA"
         SingleInstance="Yes"
         WindowsState="Normal"
         Scroll="No"
         Navigable="No"
         MaximizeButton="No"
         SysMenu="No"
         Caption="No"
    ></HEAD>
    
    <SCRIPT LANGUAGE="VBScript">
    
       Option Explicit
       Dim objNetwork, objShell
       Dim strMapDriveLetter, strMapDrivePath, bPersistent
    
       Set objNetwork = CreateObject("WScript.Network")
       Set objShell = CreateObject("Shell.Application")
       strMapDriveLetter = "M:"
       bPersistent = False
    
    Sub Window_onLoad
        window.resizeTo 400, 175
        window.moveTo 400, 300
    End Sub
    
    
    Sub MapDrive(strClassName)
    on Error Resume Next
    
       'Create full path using Class name
       strMapDrivePath = "\\NAS\" & strClassName
    
       'Disconnect current M drive
       Call DisconnectDrive()
    
       'Map drive and alias
       objNetwork.MapNetworkDrive strMapDriveLetter, strMapDrivePath, bPersistent
       objShell.NameSpace(strMapDriveLetter).Self.Name = "Home"
    
       CloseScript()
    End Sub
    
    
    Sub CloseScript
       Set objShell = Nothing
       Set objNetwork = Nothing
       Self.Close()
    End Sub
    
    
    Sub DisconnectDrive
    on Error Resume Next
       objNetwork.RemoveNetworkDrive strMapDriveLetter, True, True
    End Sub
    
    </SCRIPT>
    
    
    <BODY STYLE="font:14 pt arial;">
    <CENTER>Choose your Class
    <HR color="#0000FF">
       <Input type="button" value="  Apple  "    onClick="MapDrive('Apple')">&nbsp;&nbsp;&nbsp;&nbsp;
       <Input type="button" value="  Banana  "   onClick="MapDrive('Banana')">&nbsp;&nbsp;&nbsp;&nbsp;
       <Input type="button" value="  Pear  "     onClick="MapDrive('Pear')">
    <HR color="#0000FF">
       <Input type="button" value=" Disconnect " onClick="DisconnectDrive">&nbsp;&nbsp;&nbsp;&nbsp;
       <Input type="button" value=" Close "      onClick="CloseScript">
    </CENTER>
    </BODY>
    
    </HTML>

  5. Thanks to mrwoberts from:

    IWDave (3rd February 2014)

SHARE:
+ Post New Thread

Similar Threads

  1. Hide mapped network drives
    By timbo343 in forum Windows
    Replies: 11
    Last Post: 2nd April 2012, 09:06 AM
  2. Map network drives on wireless network
    By woody in forum Windows
    Replies: 24
    Last Post: 1st December 2007, 06:27 PM
  3. Map network drives
    By timbo343 in forum Scripts
    Replies: 7
    Last Post: 1st March 2007, 06:46 PM
  4. Replies: 4
    Last Post: 16th January 2007, 08:36 AM
  5. Mapped Network Drive with Redirected Folders
    By SpuffMonkey in forum How do you do....it?
    Replies: 5
    Last Post: 2nd November 2006, 05:23 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
  •