Jump to content

Recommended Posts

Posted

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??

Posted
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 use :D

Posted

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\CurrentVersion\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??

Posted

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\CurrentVersion\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

  • 2 years later...
Posted
I know it's an old thread, but what's contained in the check-home-dir.vbs?

 

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.

  • 1 year later...
Posted

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.

Posted
students are unplugging the network cable before the group policy is initiated, this gives them unlimited access to the internet.

 

The question I have to ask is how are they able to get unlimited access to the Internet if group policy is not applied? Why isnt your firewall preventing them?

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...