+ Post New Thread
Page 6 of 6 FirstFirst ... 23456
Results 76 to 86 of 86
Windows Thread, Deterring Kids From Unplugging Network Cables in Technical; Ninja bump, If anyone could help test http://www.edugeek.net/forums/coding...something.html a little would be appreciated :P Trying to incorporate locking of screens ...
  1. #76

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Ninja bump,

    If anyone could help test Anyone mind testing something? a little would be appreciated :P Trying to incorporate locking of screens into these, so teachers need to unlock it.

    Would help if a few other people could try to bypass it (without taskmanager obviously) :P

    Thanks Steve

  2. #77
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,524
    Thank Post
    106
    Thanked 88 Times in 74 Posts
    Blog Entries
    46
    Rep Power
    40
    Quote Originally Posted by srochford View Post
    using wscript means the process launches in the background; if you use cscript then the batch file hangs because it's waiting for the script to terminate (and it doesn't - there's a loop waiting for the cable to be unplugged)
    changed to wscript you suggest.

    if i try and copy it to the %windir% it still hangs.
    This may have something to do the c: drive being hidden on pupil machines

    if i run it from the network it only doesnt hang if i put on error resume next at the start of the script.

  3. #78

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,154
    Thank Post
    114
    Thanked 527 Times in 450 Posts
    Blog Entries
    2
    Rep Power
    123
    Quote Originally Posted by browolf View Post
    changed to wscript you suggest.

    if i try and copy it to the %windir% it still hangs.
    This may have something to do the c: drive being hidden on pupil machines

    if i run it from the network it only doesnt hang if i put on error resume next at the start of the script.
    Hiding the C: drive just hides it from explorer, it doesn't stop programs being run from it (none of Windows or the installed apps would work if that was the case!)

    Can you log on to that machine as an admin and copy the vbs file to c:\windows and then run it what happens? If I try this, I get no errors, the command prompt returns and if I unplug the network lead then the computer locks (which is what we want)

  4. #79

    Join Date
    Jun 2009
    Posts
    372
    Thank Post
    14
    Thanked 3 Times in 3 Posts
    Rep Power
    20
    we have been using this script where if the cable or wireless is turned off, the computer kills IE and locks. We tested it briefly and it all worked fine but we've had 2 instances of the same problem reported since deploying it.
    Kids are locking their work stations then when they come to unlock they get told the domain is not available. I can still ping the laptop so i know it is connected to the network and even tried plugging a cable in and turning the wireless switch off but you still get the same domain is not available error. The only solution is to log on as an administrator and force them to logoff, losing all their unsaved work in the process.
    Anyone else encountered this or know what could be causing the problem as i dont want to have to remove the script but worried it may cause too much hassle if this starts happening more often?

  5. #80

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Quote Originally Posted by farquea View Post
    we have been using this script where if the cable or wireless is turned off, the computer kills IE and locks. We tested it briefly and it all worked fine but we've had 2 instances of the same problem reported since deploying it.
    Kids are locking their work stations then when they come to unlock they get told the domain is not available. I can still ping the laptop so i know it is connected to the network and even tried plugging a cable in and turning the wireless switch off but you still get the same domain is not available error. The only solution is to log on as an administrator and force them to logoff, losing all their unsaved work in the process.
    Anyone else encountered this or know what could be causing the problem as i dont want to have to remove the script but worried it may cause too much hassle if this starts happening more often?
    Which version you using? :P written so many versions not sure which one you're on. Would help me try to narrow it down.

    Also just a heads up, (although not complete yet) writing a full program version of the original scripts, over at: Solution to stop people disconnecting network cables (Testers wanted please)

    As I said, not ready yet, but could be alternative if you get the error still, but yeah shout which version please

    Steve

  6. #81

    Join Date
    Jun 2009
    Posts
    372
    Thank Post
    14
    Thanked 3 Times in 3 Posts
    Rep Power
    20
    Quote Originally Posted by Steve21 View Post
    Which version you using? :P written so many versions not sure which one you're on. Would help me try to narrow it down.

    Also just a heads up, (although not complete yet) writing a full program version of the original scripts, over at: Solution to stop people disconnecting network cables (Testers wanted please)

    As I said, not ready yet, but could be alternative if you get the error still, but yeah shout which version please

    Steve
    Not really sure which "version" im using, it might be that i put parts together from code mentioned in this thread, but this is the script we are running;

    strComputer = "."

    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\wmi")
    Set colMonitoredEvents = objWMIService.ExecNotificationQuery _
    ("Select * from MSNdis_StatusMediaDisconnect")
    Set WshShell = WScript.CreateObject("WScript.Shell")

    Do While True
    Set strLatestEvent = colMonitoredEvents.NextEvent
    WshShell.Run "rundll32 user32.dll,LockWorkStation"


    ''''''''''''''''''''''''''''''''''''''''''''''''

    Dim objWMIService, objProcess, colProcess
    Dim strComputer, strProcessKill
    strComputer = "."
    strProcessKill = "'iexplore.exe'"

    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")

    Set colProcess = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = " & strProcessKill )
    For Each objProcess in colProcess
    objProcess.Terminate()
    Next


    ''''''''''''''''''''''''''''''''''''''''''''''''

    Loop

  7. #82

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    What do you have:

    Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\
    "Interactive logon: Require Domain Controller authentication to unlock"

    “Interactive logon: Number of previous logons to cache (in case domain controller is not available”

    and the one I can't remember its name but "allow cached logons" thingys

    Set to?

    Steve

  8. #83


    Join Date
    Jan 2012
    Posts
    2,574
    Thank Post
    924
    Thanked 342 Times in 263 Posts
    Rep Power
    206
    Danger: Incoming Necrobump!
    I figured since there was a lot of info here already it would be better to bump than to make a new thread..

    Okay, we're using NetSupport in our school.
    We have group policy in effect so if students unplug the network cable right after logging in (to avoid downloading the GPO) they get booted back off. It works. It's great.
    HOWEVER, a lot of them have cottoned on to this, and now wait until they're logged in, then unplug the network cable. Why? 'Cause the teachers NetSupport can't lock their machines if it can't talk to it, and they've figured it out. I've had a quick mooch around the NetSupport settings and can't really find anything that meets what we're looking for..

    SO! Does anybody know a way that a they can be booted off AFTER logging on if connection to the network is lost? I'm thinking 'Switch User', not actual 'Log Off' so their work (HAH!) is still preserved. Nobody here has local accounts, so they'll have to stick the cable back in in order to unlock the machine (unless, deity forbid, they know the local admin account, in which case we have a bigger problem on our hands.)

  9. #84

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Quote Originally Posted by Garacesh View Post
    [SIZE=5]
    SO! Does anybody know a way that a they can be booted off AFTER logging on if connection to the network is lost? I'm thinking 'Switch User', not actual 'Log Off' so their work (HAH!) is still preserved. Nobody here has local accounts, so they'll have to stick the cable back in in order to unlock the machine (unless, deity forbid, they know the local admin account, in which case we have a bigger problem on our hands.)
    Pretty much every script in this thread should do that, and/or programs like EduLock etc etc. As the script/exes are run on the local computers, not from a central server. Just sits polling in the background and if the conditions are met (aka no network), it'll lock pc etc.

    Shouldn't even need to switch user, as forcing a lock without a network cable plugged in (without cached profiles) won't be able to authenticate to get back onto it.

    Steve
    Last edited by Steve21; 19th March 2012 at 02:00 PM.

  10. #85


    Join Date
    Jan 2012
    Posts
    2,574
    Thank Post
    924
    Thanked 342 Times in 263 Posts
    Rep Power
    206
    I was dreading that response.. Now I look like a complete tool .
    Well that's good that the solution's already here. I'll have our GPO guy take a look-see at the codes here when he's back in tomorrow, as I wouldn't even know where to begin and would probably break everything.

  11. #86

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Quote Originally Posted by Garacesh View Post
    I was dreading that response.. Now I look like a complete tool .
    Well that's good that the solution's already here. I'll have our GPO guy take a look-see at the codes here when he's back in tomorrow, as I wouldn't even know where to begin and would probably break everything.
    Just ensure the script is running locally Else yes it'd be lost if it's disconnected cable. But aye any local scripts/exes of those sort should do it nicely. Just as mentioned in a few past posts, ensure things like need domain controller to unlock etc etc are on. Else cached profiles will still allow local access.

    Thanks,
    Steve

SHARE:
+ Post New Thread
Page 6 of 6 FirstFirst ... 23456

Similar Threads

  1. students unplugging network cable
    By centurio in forum Network and Classroom Management
    Replies: 14
    Last Post: 3rd May 2011, 09:11 PM
  2. gpo application issues (kids removing network cables)
    By jjohnsoncantell in forum Windows
    Replies: 1
    Last Post: 2nd July 2010, 12:30 PM
  3. Replies: 6
    Last Post: 27th May 2010, 08:21 AM
  4. Network Cables .. who?
    By DanW in forum Recommended Suppliers
    Replies: 8
    Last Post: 9th February 2009, 08:40 PM
  5. terminating CAT5E network cables in network cabinets
    By broc in forum Network and Classroom Management
    Replies: 7
    Last Post: 10th July 2007, 11:54 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
  •