Novell ZENworks Endpoint Security Management 3.5 Manual Do Utilizador

Página de 245
ZENworks® ESM 3.5
Administrator’s Manual
199
Action.Trace("CurLoc is: " + CurLoc);
if (CurLoc ==  "Desired Location")
{//only run this script if the user is in the desired location.  This MUST MATCH the exact name of the location in the 
policy
}
var Wired = Query.IsAdapterTypeConnected( eWIRED );
Action.Trace("Connect Status of Wired is: " + Wired);
var Wireless = Query.IsAdapterTypeConnected( eWIRELESS );
Action.Trace("Connect Status of Wireless is: " + Wireless );
var Dialup = Query.IsAdapterTypeConnected( eDIALUPCONN );
Action.Trace("Connect Status of Dialup is: " + Dialup );
var wiredDisabled = Query.IsWiredDisabled();
Action.Trace("Query on WiredDisabled is: " + wiredDisabled );
var wifiDisabled = Query.IsWiFiDisabled();
Action.Trace("Query on WifiDisabled is: " + wifiDisabled );
var dialupDisabled = Query.IsDialupDisabled();
Action.Trace("Query on DialupDisabled is: " + dialupDisabled );
//check if there is a wired connection
if (Wired)
{
Action.Trace ("Wired Connection Only!");
Action.DialupDisabledState ( eDisableAccess , 0 );
Action.WiFiDisabledState ( eDisableAccess , 0) ;
//alternative call
//Action.EnableAdapterType (false, eDIALUPCONN );