Windows Thread, Mapping pupils userdrive in Technical; We have a laptop trolley down in science, we've had many issues with getting these laptops on the domain so ...
-
13th December 2007, 12:30 PM #1 Mapping pupils userdrive
We have a laptop trolley down in science, we've had many issues with getting these laptops on the domain so we've got them running standalone with steadystate and various other things to lock them down.
Obviously we'd like them to get access to their shared area. I reckon we can do this by means of visual basic script. This would run when the user logs in and ask them for their network username. Then the script will map the drive (which should throw up the windows authentication window).
Anyone think of a better way of doing this? Am I going down the wrong route? (Using the domain isn't an option here).
Thanks
-
-
IDG Tech News
-
13th December 2007, 12:49 PM #2 Re: Mapping pupils userdrive
I've done the same thing, except my script is written in Perl and asks for the user's password too.
--
David Hicks
-
-
13th December 2007, 01:16 PM #3 Re: Mapping pupils userdrive

Originally Posted by
dhicks I've done the same thing, except my script is written in Perl and asks for the user's password too.
Any chance of sharing the knowledge?
-
-
13th December 2007, 01:18 PM #4 Re: Mapping pupils userdrive
a bit of an out of the box thought; what about using windows sharepoint services with webdav, you can access the documents via a webpage
-
-
13th December 2007, 01:33 PM #5 Re: Mapping pupils userdrive
The following Perl script uses Tk to create a little GUI box to ask the user for their username and password, then maps a network drive using those details.
# Connect to senior IT room file areas and printers.
$doAuthentication = sub {
$username = $entry1->get();
$password = $entry2->get();
# Change the following as appropriate.
system("net use h: \\\\server\\$username /user:$username $password /persistent:no");
exit(0);
};
# Ask the user for a username and password.
while (1 == 1) {
$mainWindow = MainWindow->new();
$mainWindow->configure(-title=>$computerName, -background=>'blue');
if ($screenRes == $WXGA) {
$mainWindow->geometry('+575+350');
} else {
$mainWindow->geometry('+375+250');
}
$frame1 = $mainWindow->Frame(-relief=>'groove', -borderwidth=>3, -background=>'blue');
$frame1->pack(-side=>'top', -fill=>'x');
$label1 = $frame1->Label(-text=>'Username:', -background=>'blue', -foreground=>'white');
$label1->pack(-side=>'left');
$entry1 = $frame1->Entry(-width=>40, -background=>'white');
$entry1->pack(-side=>'left', -pady=>3);
$frame2 = $mainWindow->Frame(-relief=>'groove', -borderwidth=>3, -background=>'blue');
$frame2->pack(-side=>'top', -fill=>'x');
$label2 = $frame2->Label(-text=>'Password:', -background=>'blue', -foreground=>'white');
$label2->pack(-side=>'left');
$entry2 = $frame2->Entry(-width=>40, -background=>'white');
$entry2->pack(-side=>'left', -pady=>3);
$entry2->bind('<Return>'=>$doAuthentication);
MainLoop();
}
-
-
13th December 2007, 02:47 PM #6
- Rep Power
- 0
Re: Mapping pupils userdrive
How do I get the script to run?
Do I need to put it into a bat file and run it?
-
-
13th December 2007, 02:54 PM #7 Re: Mapping pupils userdrive

Originally Posted by
frankybaloney How do I get the script to run?
If you are talking about the Perl script, you will need a Perl interpreter (dhicks can probably suggest one) and Tk libraries (I suspect GTk is used for this).
@dhicks: If you would like to share some more Perl scripts with us, PM me and I'll set up a login on the wiki
-
-
13th December 2007, 03:17 PM #8
- Rep Power
- 0
Re: Mapping pupils userdrive
Can the script be converted into a program?
Basically type in username and password, click OK type of thing with a nice GUI interface?
If so, how is this done? A step by step guide would be helpful - im new to all of this...
cheers and apologies for my lack of understanding
-
-
13th December 2007, 03:32 PM #9 Re: Mapping pupils userdrive
Perl on Windows: go and download and install ActivePerl from Activestate (www.activestate.com). This includes the Tk library, so the code above should run fine.
Place the Perl code into a text file with a .pl extension. Double-clicking on the file should then run it.
The code above produces a little GUI box that asks for username and password (that's what the Tk library does).
As others have pointed out, a script to to this might be overkill for your situation. I use the above code in part of a larger system that handles workstation reimages, software installation, printing system and so on (most of which isn't finished yet, so it'll be a while until its worth posting anything on the Wiki). I find that the script above is handy when you have several different servers to connect to with the same username/password (I plan to get it to handle logging in to Moodle, too). It also means that teachers can use their own laptops in school without having to make them part of your Windows domain (which is handy, as we don't have one).
--
David Hicks
-
-
13th December 2007, 03:54 PM #10 Re: Mapping pupils userdrive

Originally Posted by
jwood What's wrong with net use s: \\serveranme\sharename ?
Inevitably autentication will fail, and windows will prompt you to enter valid credentials.
That's what I was hoping would happen- However, it seems that it doesn't and VB just reports the error... Annoying...
-
-
13th December 2007, 04:59 PM #11 Re: Mapping pupils userdrive
Done it now- Thanks for the input guys
-
SHARE: 
Similar Threads
-
Replies: 2
Last Post: 14th November 2007, 05:42 PM
-
By chrbb in forum Wireless Networks
Replies: 3
Last Post: 3rd November 2007, 03:18 PM
-
By Oops_my_bad in forum Windows
Replies: 9
Last Post: 25th October 2007, 04:34 PM
-
By enjay in forum Network and Classroom Management
Replies: 17
Last Post: 14th September 2007, 01:21 PM
-
By Samson in forum Wireless Networks
Replies: 15
Last Post: 15th March 2007, 10:07 AM
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
-
Forum Rules