How Can I Make This VB Script Loop??
We have a script running which stops kids from unplugging the cable mid logon and not getting our smoothwall settings so that thewy can get on Facebook and YouTube. The problem is they have found out that if they do a Windows Lock while the desktop loads, which is when the script runs, that it overiddes the script and doesnt log them off, they then unlock it and carry on using it.
Basically i could do with some VB wizz telling me if there is a way to force the logoff even when the worksation is locked OR to infinitenly loop the script so that it just keeps checking for the conditions every 60 seconds. The script is;
Set objNetwork = WScript.CreateObject("WScript.Network")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
strUserName = objNetwork.UserName
if strUserName = "Administrator" then
strDomain = objNetwork.userdomain
if strdomain = "MLZ" then **this is a different domain that 6th formers and college students use who dont have H: drives mapped so can be excluded
if ObjFSO.DriveExists("h:") then **this is their home drive, if they do the unplug cable logon then they dont get their network drives and this is the condition we use to determine that they have been messing around, so log them off.