+ Post New Thread
Results 1 to 14 of 14
Windows Thread, Detect loss of conectivity on workstation? in Technical; We've had a bit of a frenzy recently where kids are pulling the cat5 cables out of the sockets, and ...
  1. #1
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,105
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36

    Detect loss of conectivity on workstation?

    We've had a bit of a frenzy recently where kids are pulling the cat5 cables out of the sockets, and we are constantly running around to fix the problem where the kids can't access their My Docs. Some are now finding a good game site and then pulling the cable so we can't trace them (unless we go there in person, which we are getting a bit fed up of doing). I would imagine other schools have had this problem, and I hope some have adopted some system to manage it. My thought, although merely a passing one, would be to get a backround script or program running which would detect loss of connectivity, and maybe freeze or lock the mouse/keyboard (or to a similar effect) until connectivity is restored.

    Now, this wouldn't be ideal on our wireless machines as they are obviously not as stable, but at least if it was possible in the "hot spots" then I could see if it worked. It was simply a passing thought, and i'd guess it'd involve a combination of backround programs and scripts to perform the task. If there are better solutions or alternatives then i'd appreciate hearing them.

  2. #2

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,572 Times in 1,252 Posts
    Rep Power
    340
    I can't say I've ever experienced pupils pulling CAT5 cables out. This really is a job for teachers to stop this happening.

    As for wireless, I do have a similar problem whereby children turn the wireless adapter off, then the next user cannot find the domain.

  3. #3

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,249
    Thank Post
    671
    Thanked 1,643 Times in 1,466 Posts
    Rep Power
    424
    Yup classroom control issue kids shouldn't be touching anything except the keyboard and mouse and not those if it can be helped

    Ben

  4. #4

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,811
    Thank Post
    3,327
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365
    Quote Originally Posted by Michael View Post
    I can't say I've ever experienced pupils pulling CAT5 cables out. This really is a job for teachers to stop this happening.

    As for wireless, I do have a similar problem whereby children turn the wireless adapter off, then the next user cannot find the domain.
    get that here with the wireless adaptor - think there is a setting on dell laptops to disable the use of the function keys. Not sure if thats of any use.

  5. #5
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,105
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36
    We have been there and done that with regards to wireless switches, only they were disabling it upon the logon scripts running (when applying settings), and timing it in such a way that it failed to apply the type settings and gave them local admin rights (this was the same for wired machines, only harder to do without being caught). Unfortunately, some kids here go into the rooms unsupervised, or likely go in there and pull a few without logging on, so tracing can be difficult.
    I was looking for a way to deal with it if it happened, as preventing is isn't all too easy.

  6. #6

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    There's a VBS script on the forums that'll reboot the machine if it loses network connectivity.

  7. #7
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,105
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36
    I did a few searches on relevant critera before making the post but couldn't find anything useful. Could you point me in the right direction or maybe recall what the key terms where for me to get the right search criteria?
    if a VBS script exists, then it may be useful to see how it goes about performing the reboot/detecting network loss etc.

  8. #8

    Join Date
    Jun 2005
    Posts
    223
    Thank Post
    6
    Thanked 8 Times in 8 Posts
    Rep Power
    30
    The following will drop an event into the logs detailing the currently logged on user when the network lead is disconnected. You could add it as a logon script.

    Code:
    strComputer = "." 
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI") 
    Set objEvents = objWMIService.ExecNotificationQuery ("SELECT * FROM MSNdis_StatusMediaDisconnect")
    Const EVENT_FAILED = 2
    
    Do While(True)
        Set objReceivedEvent = objEvents.NextEvent
    
        'report an event
    Set objShell = Wscript.CreateObject("Wscript.Shell")
    Set objNetwork = Wscript.CreateObject("Wscript.Network")
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:"  & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    strEventDescription = "Network disconnected " & objNetwork.UserDomain & "\" & objNetwork.ComputerName & " by user " & objNetwork.UserName
    objShell.LogEvent EVENT_FAILED, strEventDescription
        
    Loop
    If they are doing stuff prior to login you are a bit stuck, but if they are pulling your machines apart unsupervised access seems a bad idea.

  9. #9

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    That'd work as a startup script though wouldn't it?

  10. #10

    Join Date
    Jun 2005
    Posts
    223
    Thank Post
    6
    Thanked 8 Times in 8 Posts
    Rep Power
    30
    Quote Originally Posted by Geoff View Post
    That'd work as a startup script though wouldn't it?
    Should do if you want to modify it to reboot the machine or something, but obviously you won't be able to log a user name prior to a logon.


  11. #11
    Grommit's Avatar
    Join Date
    Sep 2006
    Location
    Weston-super-Mare
    Posts
    1,335
    Thank Post
    31
    Thanked 54 Times in 31 Posts
    Rep Power
    25
    Our kids also pull out the cat 5 when they are on a game...

    Wonder how this will work under the BSF ?

  12. #12

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,157
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124
    Quote Originally Posted by _Bob_ View Post
    Should do if you want to modify it to reboot the machine or something, but obviously you won't be able to log a user name prior to a logon.

    There's also the problem that the startup script is normally run from a network share - if you unplug the wire before the machine has started up then all bets are off as to its ability to do much of use :-)

    Having spent an excellent day yesterday at Viglen learning about all sorts of exciting new technologies I can tell you that part of the answer might be Intel Vpro/AMT - amongst many things this can do is alert you when a machine loses network connectivity. Sadly, that's no use unless you've got new machines but it's useful for the future.

  13. #13
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,105
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36
    Well, with regards to pulling the plug upon login, we countered this by a combination of upgrades to the logon procedure (hotfixes by RM, as it's a CC3 network), and also a startup script locally installed at each machine, which would ping the central server when login completes as well as checking for the existance of network shares. Using both was necessary, as if kids unplugged at the right time to bypass user settings, but plugged in at the right time as to get the ip back, it would get the ping response fine and give the all ok if just relying upon the ping; the network share is assigned during the settings being applied, thus to get this "local admin rights" amongst their other benefits would mean to forefit the network shares. When either or both of the criterion fails, the script informs the user of the logout action and logs them out immediately.

    I can't say how truely effective this has been in terms of whether it works every time, as we don't log such events and kids obviously don't come running to us because they can't "get passed security" as it where, but through my own testing this worked to an extent that was sufficiently reasonable to counter the majority of attempts. We hear little (in fact make that none in quite some time) of kids having admin rights to the machines compared to late last year, as staff are encouraged to go around briefly and just check maybe once or twice a lesson. Certainly at least, a combination of these methods is worthwhile, and the fact reports of such event occurance has gone down to practically nil suggests to us that this has been made much harder, though by no means impossible, but certainly border-lining it.

    Of course, this wasn't related to my query originally, and given this is a problem we no longer experience like we used to, I am still inclined to rectify the same "unplugging" problem just with these different effects. Supervising ICT access is something we constantly try to maintain, but it's simply impossible to do all the time, especially during lunch and after school. The knock-on effects for us aren't only just during lesson time (unable to monitor machines), but also the after effects of having to correct the problem when staff can't comprehend what to do themselves over the phone (which for some is understandable and we will happily sort it for them). My hope was that if there was a deterrent to such action, which meant the students would see no benefit in unplugging the cable (whilst logged on at least), then it would at least reduce the workload of rectifying it ourselves or explaining to staff. As expected, you might get the odd "driveby unplugging" to explain it simply, though if there is a solution to minimise the disruption where possible, then i'll gladly consider its trialing.

    Slightly longer than I had intended - I have a habbit of rambling a bit excessively
    Last edited by dgsmith; 13th March 2008 at 08:35 PM.

  14. #14
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,105
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36
    Quote Originally Posted by _Bob_ View Post
    The following will drop an event into the logs detailing the currently logged on user when the network lead is disconnected. You could add it as a logon script.

    Code:
    strComputer = "." 
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI") 
    Set objEvents = objWMIService.ExecNotificationQuery ("SELECT * FROM MSNdis_StatusMediaDisconnect")
    Const EVENT_FAILED = 2
    
    Do While(True)
        Set objReceivedEvent = objEvents.NextEvent
    
        'report an event
    Set objShell = Wscript.CreateObject("Wscript.Shell")
    Set objNetwork = Wscript.CreateObject("Wscript.Network")
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:"  & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    strEventDescription = "Network disconnected " & objNetwork.UserDomain & "\" & objNetwork.ComputerName & " by user " & objNetwork.UserName
    objShell.LogEvent EVENT_FAILED, strEventDescription
        
    Loop
    If they are doing stuff prior to login you are a bit stuck, but if they are pulling your machines apart unsupervised access seems a bad idea.
    Just tested that on my home computer (compiled to exe and ran as a standard exe file, to test it's workability), and hey presto.. it detected the disconect in less than a second, and the cpu usage it needs doesn't even top 1% (I didn't notice an increase on cpu demand). Certainly something to work from! Cheers!

SHARE:
+ Post New Thread

Similar Threads

  1. Complete loss of all network!!!
    By badboyvtec in forum Wireless Networks
    Replies: 15
    Last Post: 20th February 2008, 01:02 PM
  2. A sad loss to fantasy
    By GrumbleDook in forum General Chat
    Replies: 5
    Last Post: 8th February 2008, 01:44 PM
  3. Automatically detect settings
    By techyphil in forum Windows
    Replies: 5
    Last Post: 26th November 2007, 09:28 PM
  4. Detect Ctitrix session from within bat/vbs?
    By Geoff in forum Thin Client and Virtual Machines
    Replies: 9
    Last Post: 19th July 2006, 11:24 AM
  5. Exchange hair loss
    By steelrazor in forum Wireless Networks
    Replies: 3
    Last Post: 6th July 2006, 01:36 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
  •