I think this has been mentioned before but couldn’t find the thread, but anyhow. One of my schools has a trolley of 30 netbooks that are standalone and have a standard local account for the pupils to use that auto logs on. This works well as they are quick to get to the desktop as no logging on the domain over wireless. The only downside is transferring work pupils do on them back to their home drives on the network.
Now I know I could make a shared folder that pupils could dump stuff into from the netbooks and then copy back when on a domain computer but that was too much faf, plus not much help the other way.
So after digging around Google and chopping up some scripts I now have a VBScript that prompts for a username and password and then maps the Home Folder based on the username entered and then opens the newly created drive. Code below for anyone who might find it useful.
Code:'Script to map Home Folder on netbook On Error Resume Next Dim objNetwork Dim strDriveLetter, strRemotePath, strUserName, strPassword strDriveLetter = "N:" strRemotePath = "\\w2k8srv01\pupils$" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objNetwork = WScript.CreateObject("WScript.Network") 'Removes strDriveletter if it exists. If objFSO.DriveExists("N:") = True Then objNetwork.RemoveNetworkDrive "N:", True, True End If 'Ask for Username strUserName = InputBox ("Enter your Username") 'Ask for Password strPassword = InputBox ("Enter your Password") 'Maps Networkdrive path to strRemotePath & strUserName using credentials strUserName & strPassword objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _ & "\" & strUserName, False, strUsername, strPassword If Err.Number <> 0 Then WScript.Echo " Drive not mapped. Incorrect Username or Password" Err.Clear WScript.Quit End If 'Opens mapped drive Call ShowExplorer WScript.Quit Sub ShowExplorer() Set objShell = CreateObject("WScript.Shell") objShell.run ("Explorer" & " " & strDriveLetter & "\" ) End Sub WScript.Quit
i did also have a program that would do this, minimise to sys tray and give them the option to disconnect at the end of it.
mine was done with it popping up a box saying "This software needs to be unlocked to this machine, your unique code is xxxx please see the techies for an unlock code"
and all it basically done was make an encryption key out of a mac address on the machine and the unlocked key used that. it just meant the software couldn't be passed around to students we didn't want having it.
if anyone wants it let me know as ill have to change a couple of the strings (like server, sec group etc) before compiling
What would be even more impressive would be to take the credentials , query AD to find the home drive location for that user, and then map it - don't know if this is even possible, but something to ponder over the weekend ..
strUserName = InputBox ("Enter your Username")
strLogonUserName = "domain\" & strUserName
Then in the script where you need to use domain\user you use strLogonUserName and where you need to map the drive you use strUserName
That should work I think?
we use the same style - local log-ins to netbooks / tablets and then use the external link to HAP - that way all the drives are accessible to students, and they can upload to their own areas.
Hi! I tried a modified version of this script (for our network) but it breaks whenever user credentials are passed to it.
I think it's a permissions problem because it works when mapping with my own (admin) account, but not for any other. Does anyone know what requirements there are for the share and user permissions for this to work? Anyone care to give a working set of permissions as an example?
Google says system, creator owner, authenticated users, and admin should be present, but even with all these at full access, there's no joy...
There are currently 1 users browsing this thread. (0 members and 1 guests)