Not sure if this has been discussed on here before.
students are unplugging the network cable before the group policy is initiated, this gives them unlimited access to the internet.
we use mandatory profiles, is there any way of stopping them??
Not sure if this has been discussed on here before.
students are unplugging the network cable before the group policy is initiated, this gives them unlimited access to the internet.
we use mandatory profiles, is there any way of stopping them??
Search and Ye shall Find!
done a search before, nothing!!!

The sad thing is that Geoff didn't even use the search engine for that ... he knows the URLs for all threads.
Well that petabyte of hard disk space has to go to some useOriginally Posted by GrumbleDook
![]()
Many thanks geoff, I'll try this script
'check for unplugged network cord during logon
'checks for mapped drives
'merge registry key to run
'| Windows Registry Editor Version 5.00
'| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run]
'| "check-home-dir"="\"C:\\WINDOWS\\check-home-dir.vbs\""
'copy this vbs file to c:\windows directory
'John Cook - 03/2007
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
WScript.Sleep 30000 ' thirty seconds
If ObjFSO.DriveExists("U:") Then
If ObjFSO.DriveExists("O:") Then
Else
WshShell.Run "logoff.exe"
End If
Else
WshShell.Run "logoff.exe"
End If
But how do I put in a statment that allows the administrator to log on without the vbs taking effect??
I've answered my own question
'check for unplugged network cord during logon
'checks for mapped drives
'merge registry key to run
'| Windows Registry Editor Version 5.00
'| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run]
'| "check-home-dir"="\"C:\\WINDOWS\\check-home-dir.vbs\""
'copy this vbs file to c:\windows directory
'John Cook - 03/2007
Dim objNetwork
Dim strUserName
Dim WshShell
Set objNetwork = WScript.CreateObject("WScript.Network")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
WScript.Sleep 5000 ' five seconds
strUserName = objNetwork.UserName
if strUserName = "Administrator" then
else
if ObjFSO.DriveExists("k:") then
else
WshShell.Run "logoff.exe"
msgbox "Do not unplug the network Cable"
End if
End if
I know it's an old thread, but what's contained in the check-home-dir.vbs?
CHOCOLATE MONEY!! WOOOHOOO!
Sorry... I'll go now....![]()
Far too many Dr Peppers!![]()
That *is* check-home-dir.vbs - you need to copy the code into Notepad and save it as a vbs file in the path given. The ' at the start of the initial lines denotes a comment. The registry lines are there so you can create a reg file to merge and autorun check-home-dir.vbs if it is placed in the path shown in the comment.
tagging onto this.... we already use the check-home script but i want to put something in place that when a user unplugs the network cable that something happens that either makes it a pointless task or requires some sort of intervention from a teacher to allow them to be able to work. The first i think would be easier and thinknig, if a network cable is unplugged then log the user off.
I want to do this to stop kids unplugging them to get round netsupport and just generally playing silly buggers unplugging them.
All we did is "snip" the clips off of the connectors so that you have to use a screwdriver to unplug it!
There are currently 1 users browsing this thread. (0 members and 1 guests)