+ Post New Thread
Page 3 of 6 FirstFirst 123456 LastLast
Results 31 to 45 of 86
Windows Thread, Deterring Kids From Unplugging Network Cables in Technical; I've just found out pupils are doing this here! The script works a treat ... although I've changed "WshShell.Run "rundll32 ...
  1. #31
    jdibsdale's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    84
    Thank Post
    1
    Thanked 3 Times in 3 Posts
    Rep Power
    13
    I've just found out pupils are doing this here! The script works a treat ... although I've changed "WshShell.Run "rundll32 user32.dll,LockWorkStation"" to WshShell.Run "logoff.exe"

    Now I need the quickest, most efficient way to get this script into the startup folders of the computers without having to log on as an Admin to every workstation. Any suggestions? I don't redirect the start menu.

  2. #32

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,686
    Thank Post
    333
    Thanked 513 Times in 481 Posts
    Rep Power
    178
    Could try cheating, and make a once off login script that'll copy it from server to X folder? Ok all need to be rebooted, but guessing that's easy enough to remotely do at end of day?

    ps - If you check first page it was logoff.exe to start with :P But then it was changed as people asked for locks/smiting etc

    Steve

  3. #33
    jdibsdale's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    84
    Thank Post
    1
    Thanked 3 Times in 3 Posts
    Rep Power
    13
    I have written an xcopy script but it doesn't work without logging on as an Admin to all PC's because the pupils do not have permission to write in the "All Users" start up folder. Their own profiles get deleted when the pc is shut down.

  4. #34

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,767
    Thank Post
    840
    Thanked 1,663 Times in 1,448 Posts
    Blog Entries
    11
    Rep Power
    442
    Can you still by-pass the group policy in Windows 7?


    Quote Originally Posted by jdibsdale View Post
    I've just found out pupils are doing this here! The script works a treat ... although I've changed "WshShell.Run "rundll32 user32.dll,LockWorkStation"" to WshShell.Run "logoff.exe"

    Now I need the quickest, most efficient way to get this script into the startup folders of the computers without having to log on as an Admin to every workstation. Any suggestions? I don't redirect the start menu.
    Simple startup script should do the trick.

    Copy Files - Wiki

    Did you use this one?

    Code:
    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 "logoff.exe"
    
    
    ''''''''''''''''''''''''''''''''''''''''''''''''
    
    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
    Last edited by FN-GM; 25th March 2011 at 03:25 PM.

  5. #35
    DrCheese's Avatar
    Join Date
    Apr 2008
    Posts
    1,023
    Thank Post
    97
    Thanked 158 Times in 107 Posts
    Rep Power
    58
    So you can run this as a computer startup script rather than a user logon script? I've not tested either yet.

  6. #36
    jdibsdale's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    84
    Thank Post
    1
    Thanked 3 Times in 3 Posts
    Rep Power
    13
    Quote Originally Posted by FN-GM View Post
    Can you still by-pass the group policy in Windows 7?




    Simple startup script should do the trick.

    Copy Files - Wiki

    Did you use this one?

    Code:
    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 "logoff.exe"
    
    
    ''''''''''''''''''''''''''''''''''''''''''''''''
    
    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
    No I used the script pasted below... am working through your different startup scripts to get the script copied over but it's not working so far

    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 "logoff.exe"
    Loop

  7. #37

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,767
    Thank Post
    840
    Thanked 1,663 Times in 1,448 Posts
    Blog Entries
    11
    Rep Power
    442
    Are you on server 2008? If so you would be better using group policy preferencess.

  8. #38
    jdibsdale's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    84
    Thank Post
    1
    Thanked 3 Times in 3 Posts
    Rep Power
    13
    Quote Originally Posted by FN-GM View Post
    Are you on server 2008? If so you would be better using group policy preferencess.
    Am using server 2003. Have got it to copy across now thank you with the simple copy startup .bat file. Now testing with a student login and pulling the cable out. I know the script works if you pull out the cable when it's all logged on ... just testing if it will do the same when they pull the cable out at login.

  9. #39
    jdibsdale's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    84
    Thank Post
    1
    Thanked 3 Times in 3 Posts
    Rep Power
    13
    Finally done it and tried and tested. I changed the script to this one though: http://www.edugeek.net/forums/securi...ble-admin.html I found with the other script it only worked when it was logged in, not whilst it was logging on.

    Thanks for you help... some little people are going to be gutted next week!

  10. #40

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,666
    Thank Post
    1,614
    Thanked 1,866 Times in 1,384 Posts
    Blog Entries
    2
    Rep Power
    400
    if you have the budget for it, buy wireless cards for the PCs. They will take GPO and connect even if the network cable is unplugged. Annoyed so many of the kids here that they gave up in the end.

  11. #41
    jdibsdale's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    84
    Thank Post
    1
    Thanked 3 Times in 3 Posts
    Rep Power
    13
    Quote Originally Posted by nephilim View Post
    if you have the budget for it, buy wireless cards for the PCs. They will take GPO and connect even if the network cable is unplugged. Annoyed so many of the kids here that they gave up in the end.
    It's not just the budget for the wireless cards, it's the budget for the wireless too! Plus we have a lot of wireless laptops so this doesn't give us a solution for them turning off the wireless on the laptops.

    The script solves both issues without any extra cost.

  12. #42
    mrbios's Avatar
    Join Date
    Jun 2007
    Location
    Stroud, Gloucestershire
    Posts
    2,419
    Thank Post
    343
    Thanked 250 Times in 206 Posts
    Rep Power
    97
    simple fix: Don't setup classrooms with the PCs on/under/around desks

  13. #43
    Grimley's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    10
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Seeing as I used to be one of the many kids who thought it was funny pulling out cables, this would definitely work
    Quote Originally Posted by SYNACK View Post
    Razor Wire:
    http://upload.wikimedia.org/wikipedi...Wire_Bunch.JPG

    They sould make ethernet cables like this, would solve a lot of problems.

  14. #44

    Join Date
    Jun 2009
    Posts
    372
    Thank Post
    14
    Thanked 3 Times in 3 Posts
    Rep Power
    20
    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

    I'm using this script at the moment but just had a teacher complaining about kids turning the wireless switch off. Any clever clogs know how i could adapt the script to do the same when the wireless card being turned off??

  15. #45

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,686
    Thank Post
    333
    Thanked 513 Times in 481 Posts
    Rep Power
    178
    Quote Originally Posted by farquea View Post
    I'm using this script at the moment but just had a teacher complaining about kids turning the wireless switch off. Any clever clogs know how i could adapt the script to do the same when the wireless card being turned off??
    I'll try to sort it this afternoon if I get some free time, but harder to play with it when I don't have a wireless card on this pc :P

    *Edit - On a side note, do you know the name of your wireless adaptors? or you got many different ones? Easier to pick it's name, rather than checking all connections

    Steve
    Last edited by Steve21; 30th March 2011 at 02:07 PM.

SHARE:
+ Post New Thread
Page 3 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
  •