+ Post New Thread
Page 2 of 6 FirstFirst 123456 LastLast
Results 16 to 30 of 86
Windows Thread, Deterring Kids From Unplugging Network Cables in Technical; Ooh how much and where can I get one? P.S. does it come with the batteries?...
  1. #16

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,678
    Thank Post
    861
    Thanked 650 Times in 431 Posts
    Rep Power
    499
    Ooh how much and where can I get one?

    P.S. does it come with the batteries?

  2. #17

    Join Date
    Apr 2007
    Location
    York
    Posts
    560
    Thank Post
    10
    Thanked 4 Times in 4 Posts
    Rep Power
    20
    Was talking to a colleague from a different school last night and they have made it so as soon as the network cable is unplugged it locks the workstation.

  3. #18

    Join Date
    Jun 2009
    Posts
    372
    Thank Post
    14
    Thanked 3 Times in 3 Posts
    Rep Power
    20
    Quote Originally Posted by karldenton View Post
    Was talking to a colleague from a different school last night and they have made it so as soon as the network cable is unplugged it locks the workstation.
    any idea how they have done this?

  4. #19

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,698
    Thank Post
    335
    Thanked 516 Times in 484 Posts
    Rep Power
    180
    Quote Originally Posted by farquea View Post
    any idea how they have done this?
    Try:

    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"
    Loop
    Should work,

    Steve

  5. Thanks to Steve21 from:

    tech_guy (24th March 2011)

  6. #20

    SpuffMonkey's Avatar
    Join Date
    Jul 2005
    Posts
    2,241
    Thank Post
    55
    Thanked 278 Times in 186 Posts
    Rep Power
    134
    I've been considering trying some of these

    Connectix security bracket for RJ45

  7. #21

    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
    Try:



    Should work,

    Steve
    Yep that works thanks, now just not really sure how i can use this to achieve anything!

  8. #22

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,698
    Thank Post
    335
    Thanked 516 Times in 484 Posts
    Rep Power
    180
    Quote Originally Posted by farquea View Post
    Yep that works thanks, now just not really sure how i can use this to achieve anything!
    Well I guess generally they disconnect the cable to try to prevent GPOs loading, however if it autolocks they'll need to replug it to unlock it "or guessing you'd need server connection anyway"

    But yeah, I'd have assumed sending email/report etc to admins of user names/times etc would be better

    Steve

  9. #23
    p858snake's Avatar
    Join Date
    Dec 2008
    Location
    Queensland
    Posts
    1,490
    Thank Post
    37
    Thanked 175 Times in 151 Posts
    Blog Entries
    2
    Rep Power
    51
    I think from memory LanSchool can lock the workstations if it looses access to the teacher console.

  10. #24
    DrCheese's Avatar
    Join Date
    Apr 2008
    Posts
    1,033
    Thank Post
    97
    Thanked 161 Times in 110 Posts
    Rep Power
    60
    Quote Originally Posted by p858snake View Post
    I think from memory LanSchool can lock the workstations if it looses access to the teacher console.
    It can't, I wish it could. Students here load a game up before the teacher blocks IE and then they pull the cable out.

    That script above works well but I'd have to change our GP to require domain auth on unlock, rather than allowing cached info.

  11. #25

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,698
    Thank Post
    335
    Thanked 516 Times in 484 Posts
    Rep Power
    180
    Quote Originally Posted by DrCheese View Post
    It can't, I wish it could. Students here load a game up before the teacher blocks IE and then they pull the cable out.

    That script above works well but I'd have to change our GP to require domain auth on unlock, rather than allowing cached info.
    Well if you have cached logon enabled, and want it stricter.

    Could always make script lock account, and log them off :P Not gonna get back on without seeing admin then.

    However, could lead to hundreds of "friends" locking eachother out by pulling cables. But then no different to login passwords anyway

    Steve

  12. #26
    DrCheese's Avatar
    Join Date
    Apr 2008
    Posts
    1,033
    Thank Post
    97
    Thanked 161 Times in 110 Posts
    Rep Power
    60
    I might be cruel and add "killall iexplore.exe" or the like to that script, so not only will it lock the computer but murder any Internet explorer windows with the games :P

  13. #27
    p858snake's Avatar
    Join Date
    Dec 2008
    Location
    Queensland
    Posts
    1,490
    Thank Post
    37
    Thanked 175 Times in 151 Posts
    Blog Entries
    2
    Rep Power
    51
    Quote Originally Posted by DrCheese View Post
    I might be cruel and add "killall iexplore.exe" or the like to that script, so not only will it lock the computer but murder any Internet explorer windows with the games :P
    Script it to save the details locally, then when it has network back move the records to central location then just have a powershell (or other favourite script) script check the file and disable their accounts.

  14. #28

    Join Date
    Jun 2009
    Posts
    372
    Thank Post
    14
    Thanked 3 Times in 3 Posts
    Rep Power
    20
    Quote Originally Posted by DrCheese View Post
    I might be cruel and add "killall iexplore.exe" or the like to that script, so not only will it lock the computer but murder any Internet explorer windows with the games :P
    Would you know how to actually add that to the script that was given on the first page? I'm useless when it comes to scripting im afraid

    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"
    Loop

  15. #29
    Galway's Avatar
    Join Date
    Jun 2007
    Location
    West Yorkshire
    Posts
    1,367
    Thank Post
    9
    Thanked 311 Times in 219 Posts
    Rep Power
    101
    Quote Originally Posted by karldenton View Post
    Was talking to a colleague from a different school last night and they have made it so as soon as the network cable is unplugged it locks the workstation.

    Impero does it ... and it stop kids sharing accounts.

  16. #30

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,698
    Thank Post
    335
    Thanked 516 Times in 484 Posts
    Rep Power
    180
    Quote Originally Posted by farquea View Post
    Would you know how to actually add that to the script that was given on the first page? I'm useless when it comes to scripting im afraid
    Try this (Think it'll run slowish though but will work "i hope" :P) (I assume your IE's are named iexplore.exe if not change)

    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
    Shout if problems, (Not sure if declaring 2 WMI objects will make it emo, but we'll see)

    Steve

SHARE:
+ Post New Thread
Page 2 of 6 FirstFirst 123456 LastLast

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
  •