EAccessState
eApplyGlobalSetting = -1
eDisableAccess = 0
eAllowAccess = 1
EAdapterType
eWIRED
eWIRELESS
eDIALUPCONN
EComparison
eEQUAL
eLESS
eGREATER
eEQUALORLESS
eEQUALORGREATER?
ESTDisplayMsg
eONLYONCE
eEVERYTIME
eSECONDS
eNOMSG
EHardwareDeviceController
eIrDA = 0
e1394
eBlueTooth
eSerialPort
eParrallelPort
ELogLevel
eALARM
eWARN
eINFO
EMATCHTYPE
eUNDEFINED
eLOCALIP
eGATEWAY
eDNS
eDHCP
eWINS
eWAP
eDIALUP
eUNKNOWN
eDOMAIN
eRULE
eUSERSELECTED
EMinimumWiFiSecurityState
eNoEncryptionRequired = 0
eWEP64
eWEP128
eWPA
ERegKey
eCLASSES_ROOT
eCURRENT_USER
eLOCAL_MACHINE
eUSERS
eCURRENT_CONFIG
ERegType
eSTRING
eDWORD
eBINARY
eMULTI_SZ
eEXPAND_SZ
EServiceState
eRUN
eSTOP
ePAUSE
ePENDING
eNOTREG
EVariableScope
ePolicyChange = 0 // reset on a policy update
eLocationChange = 1 // reset on a location change
TRIGGEREVENT
eTIMER
eSTARTUP
eLOCATIONCHANGE
eTIMEOFDAY
eADAPTERARRIVAL
eADAPTERREMOVAL
eMEDIACONNECT
eMEDIADISCONNECT
ePOLICYUPDATED
eUSERCHANGEDSHIELD
ePROCESSCHANGE
eWITHINTIME
eRUNNOW
eDOWNLOADFAILED
eDOWNLOADSUCCESS
JScript:
Action.CheckForUpdate();
VBScript:
Action.CheckForUpdate()
When setting the ShieldState (firewall) by name, the name specified must exactly match the firewall specified in the policy. Three firewall settings are always available regardless of the policy :"All Closed", "All Adaptive", and "All Open".
JScript:
Action.SetShieldStateByName("Closed",true);
Action.Trace("Start 20 second sleep");
Action.Sleep(20000);
var ret = Action.ClearFixedShieldState();
if(ret == true)
Action.Trace("ret = true");
else
Action.Trace("ret = false");
VBScript:
Action.SetShieldStateByName "Closed",true
Action.Trace("Start 20 second sleep")
Action.Sleep(20000)
dim ret
ret = Action.ClearFixedShieldState()
if(ret = true) then
Action.Trace("ret = true")
else
Action.Trace("ret = false")
end if
When setting the Location by name, the name specified must exactly match the location specified in the policy.
JScript:
Action.SwitchLocationByName("Base");
Action.Stamp();
Action.Trace("Begin 20 second sleep");
Action.Sleep(20000);
Action.SwitchLocationByName("Base");
Action.ClearStamp();
VBScript:
Action.SwitchLocationByName("Base")
Action.Stamp()
Action.Trace("Begin 20 second sleep")
Action.Sleep(20000)
Action.SwitchLocationByName("Base")
Action.ClearStamp()
Example D-1 Details:
Base must be the name of a valid location that can be stamped. This script then switches to location Base, stamps it, sleeps for 20 seconds, makes sure it didn't spin out of the location by switching back to Base, then clears the stamp. This script performed all actions as expected.
JScript:
var ret = Action.CreateRegistryKey(eLOCAL_MACHINE,"Software\\Novell","Tester");
if(ret == true)
Action.Trace("Create Key is Successful");
else
Action.Trace("Create Key did not work");
VBScript:
dim ret
ret = Action.CreateRegistryKey(eLOCAL_MACHINE,"Software\\Novell","Tester")
if(ret = true) then
Action.Trace("Create Key is Successful")
else
Action.Trace("Create Key did not work")
end if
JScript:
var ret = Action.DeleteRegistryKey(eLOCAL_MACHINE,"Software\\Novell\\Tester");
if(ret == true)
Action.Trace("Delete Key is Successful");
else
Action.Trace("Delete Key did not work");
VBScript:
dim ret
ret = Action.DeleteRegistryKey(eLOCAL_MACHINE,"Software\\Novell\\Tester")
if(ret = true) then
Action.Trace("Delete Key is Successful")
else
Action.Trace("Delete Key did not work")
end if
JScript:
Action.DeleteRegistryValue(eLOCAL_MACHINE,"Software\\Novell\\Tester","val1"); Action.DeleteRegistryValue(eLOCAL_MACHINE,"Software\\Novell\\Tester","val2");
VBScript:
Action.DeleteRegistryValue eLOCAL_MACHINE,"Software\\Novell\\Tester","val1" Action.DeleteRegistryValue eLOCAL_MACHINE,"Software\\Novell\\Tester","val2"
The first parameter of the DisplayMessage call is a unique integer identifier for each action. When calling the Message by name, the name specified must exactly match the DisplayMessage specified in the policy.
JScript:
Action.DisplayMessage("40","Message40", "Message Here", "question", "");
Action.Sleep(10000);
Action.DisplayMessageByName("Message40");
VBScript:
Action.DisplayMessage "40","Message40", "Message Here", "question", "" Action.Sleep(10000) Action.DisplayMessageByName "Message40"
Example D-2 Details:
This script creates a Message Box with all parameters and then waits 10 seconds, (during which the tester should click OK to end box display). The script then displays the Message Box by the ID and waits 10 seconds, (again, the tester should click OK to end box display). Finally, it displays the Message Box by name.
JScript:
Action.EnableAdapterType(false, eWIRELESS); Action.EnableAdapterType(true, eWIRELESS); Action.EnableAdapterType(false, eWIRED); Action.EnableAdapterType(true, eWIRED); Action.EnableAdapterType(false, eDIALUPCONN); Action.EnableAdapterType(true, eDIALUPCONN);
VBScript:
Action.EnableAdapterType false, eWIRELESS Action.EnableAdapterType true, eWIRELESS Action.EnableAdapterType false, eWIRED Action.EnableAdapterType true, eWIRED Action.EnableAdapterType false, eDIALUPCONN Action.EnableAdapterType true, eDIALUPCONN
The first parameter of the Launch call is a unique integer identifier for each action.
JScript:
Action.Launch("50","C:\calco.exe","");
VBScript:
Action.Launch "51","C:\calco.exe",""
JScript:
Action.LaunchAsSystem("C:\calco.exe"," sParameters ", "sWorkingDir",true);
VBScript:
Action.LaunchAsSystem "C:\calco.exe"," sParameters"," sWorkingDir",true
This launches in the user context and returns the exit code of the application that was launched.
JScript:
Action.LaunchAsUserWithCode(appToLaunch, "sParameters", "sWorkingDir", bShow, bWait, nExitCode);
VBScript:
Action.LaunchAsUserWithCode appToLaunch, "sParameters", "sWorkingDir", bShow, bWait, nExitCode
Example D-3 Details:
Preliminary setup is required by creating a policy that includes a new Integrity rule with a custom message. The custom message includes a launch link that was added to the SCC menu bar.
When you set the LaunchLink by name, the name specified must exactly match the launch link specified in the policy.
JScript:
Action.LaunchLinkByName("MyLink");
VBScript:
Action.LaunchLinkByName "MyLink"
JScript:
Action.LogEvent("MyEvent", eALARM, "This is a log test message");
VBScript:
Action.LogEvent "MyEvent", eALARM, "This is a vb log test message"
Example D-4 Details:
Logging must be enabled as a prerequisite.
An asynchronous message is displayed and the script continues.
JScript:
Action.Message("Display sync message");
VBScript:
Action.Message "Display sync message"
A synchronous message is displayed and waits for the user to respond before the script continues.
NOTE:nTimeoutSeconds values of -1 or 0 will never timeout
nMessageType (buttons shown):
OK/Cancel
Abort/Retry/Ignore
Yes/No/Cancel
Currently, the return value of the buttons pressed by the user is not returned, so it is not helpful for conditional logic control.
Action.Message("Message Title Bar", nMessageType, nTimeoutSeconds);
VBScript:
Action.Message "Message Title Bar", nMessageType, nTimeoutSeconds
JScript:
Action.PauseService("lanmanworkstation");
VBScript:
Action.PauseService "lanmanworkstation"
Example D-5 Details:
Make sure you use the actual service name, not the display name.
This API creates dialog boxes and user interfaces. It will be covered in a future revision given the complexity and need for examples.
JScript:
Action.StartService("lanmanworkstation","");
VBScript:
Action.StartService "lanmanworkstation",""
Example D-6 Details:
Make sure you use the actual service name, not the display name.
JScript:
Action.StopService("lanmanworkstation");
VBScript:
Action.StopService "lanmanworkstation"
Example D-7 Details:
Make sure you use the actual service name, not the display name.
JScript:
var ret = Action.CreateRegistryKey(eLOCAL_MACHINE,"Software\\Novell","Tester");
if(ret == true)
Action.Trace("Create Key is Successful");
else
Action.Trace("Create Key did not work");
Action.WriteRegistryDWORD(eLOCAL_MACHINE,"Software\\Novell\\Tester","val1",24);
Action.WriteRegistryString(eLOCAL_MACHINE,"Software\\Novell\\Tester","val2","Novell");
VBScript:
dim ret
ret = Action.CreateRegistryKey(eLOCAL_MACHINE,"Software\\Novell","Tester")
if(ret = true) then
Action.Trace("Create Key is Successful")
else
Action.Trace("Create Key did not work")
end if
Action.WriteRegistryDWORD eLOCAL_MACHINE,"Software\\Novell\\Tester","val1",24
Action.WriteRegistryString eLOCAL_MACHINE,"Software\\Novell\\Tester","val2","Novell"
JScript:
var ret;
ret = Query.FileExistsVersion("C:","ocalco.exe",eEQUAL,"5","1","2600","0");
if(ret == 1)
Action.Trace("File is Equal");
else
Action.Trace("File is Not Equal");
VBScript:
dim ret
ret = Query.FileExistsVersion("C:\","ocalco.exe",eEQUAL,"5","1","2600","0")
if(ret = true) then
Action.Trace("File is Equal")
else
Action.Trace("File is Not Equal")
end if
NOTE:Not all files have file version information.
JScript:
var adplist;
var adplength;
var adp;
adplist = Query.GetAdapters();
adplength = adplist.Length;
Action.Trace("adplength = " + adplength);
if(adplength > 0)
{
adp = adplist.Item(0);
Action.Trace("DeviceID = " + adp.DeviceID);
Action.Trace("Enabled = " + adp.Enabled);
Action.Trace("IP = " + adp.IP);
Action.Trace("MAC = " + adp.MAC);
Action.Trace("MaxSpeed = " + adp.MaxSpeed);
Action.Trace("Name = " + adp.Name);
Action.Trace("SubNetMask = " + adp.SubNetMask);
Action.Trace("Type = " + adp.Type);
}
VBScript:
dim adplist
dim adplength
dim adp
set adplist = Query.GetAdapters()
adplength = CInt(adplist.Length)
Action.Trace("adplength = " & adplength)
if(adplength > 0) then
set adp = adplist.Item(0)
Action.Trace("DeviceID = " & adp.DeviceID)
Action.Trace("Enabled = " & adp.Enabled)
Action.Trace("IP = " & adp.IP)
Action.Trace("MAC = " & adp.MAC)
Action.Trace("MaxSpeed = " & CLng(adp.MaxSpeed))
Action.Trace("Name = " & adp.Name)
Action.Trace("SubNetMask = " & adp.SubNetMask)
Action.Trace("Type = " & adp.Type)
end if
Example D-8 Details:
This script gets a list of adapters, the length of the list (number of adapters), and enumerates the properties of the first index in the list.
JScript:
var ret;
ret = Query.GetCheckinTime();
Action.Trace("LastCheckIn = " + ret);
VBScript:
dim ret
ret = Query.GetCheckinTime()
Action.Trace("LastCheckIn = " & ret)
JScript:
var envdata;
var envdatalength;
envdatalength = Query.LocationMatchCount;
Action.Trace("MatchCount = " + envdatalength);
if(envdatalength > 0)
{
envdata = Query.GetLocationMatchData(0);
Action.Trace("IP = " + envdata.IP);
Action.Trace("MAC = " + envdata.MAC);
Action.Trace("SSID = " + envdata.SSID);
Action.Trace("Type = " + envdata.Type);
}
VBScript:
dim envdata
dim envdatalength
envdatalength = Query.LocationMatchCount
Action.Trace("MatchCount = " & envdatalength)
if(envdatalength > 0) then
set envdata = Query.GetLocationMatchData(0)
Action.Trace("IP = " & envdata.IP)
Action.Trace("MAC = " & envdata.MAC)
Action.Trace("SSID = " & envdata.SSID)
Action.Trace("Type = " & envdata.Type)
end if
Example D-9 Details:
This script requires an network environment to be defined for a location in the policy in order to provide useful data. This script then gets the Location Match Count and if the count is greater than 0, it enumerates the attributes for the first Location Match Data.
JScript:
var ret;
ret = Query.IsAdapterTypeConnected(eWIRED);
Action.Trace("IsWiredConnected = " + ret);
ret = Query.IsAdapterTypeConnected(eWIRELESS);
Action.Trace("IsWirelessConnected = " + ret);
ret = Query.IsAdapterTypeConnected(eDIALUPCONN);
Action.Trace("IsModemConnected = " + ret);
VBScript:
dim ret
ret = Query.IsAdapterTypeConnected(eWIRED)
Action.Trace("IsWiredConnected = " & ret)
ret = Query.IsAdapterTypeConnected(eWIRELESS)
Action.Trace("IsWirelessConnected = " & ret)
ret = Query.IsAdapterTypeConnected(eDIALUPCONN)
Action.Trace("IsModemConnected = " & ret)
JScript:
var ret = Query.IsAuthenticated();
Action.Trace("Is authenticated = " + ret);
VBScript:
dim ret
ret = Query.IsAuthenticated()
Action.Trace("Is authenticated = " & ret)
JScript:
var ret = Query.IsWindowsXP();
Action.Trace("Is XP = " + ret);
VBScript:
dim ret
ret = Query.IsWindowsXP()
Action.Trace("Is XP = " & ret)
JScript:
var ret = Query.IsWindows2000();
Action.Trace("Is Win2000 = " + ret);
VBScript:
dim ret
ret = Query.IsWindows2000()
Action.Trace("Is Win2000 = " & ret)
JScript:
var ret = Query.ProcessIsRunning("STEngine.exe",eEQUAL,"","","","");
Action.Trace("Is Running = " + ret);
VBScript:
dim ret
ret = Query.ProcessIsRunning("STEngine.exe",eEQUAL,"","","","")
Action.Trace("Is Win2000 = " & ret)
JScript:
var ret;
ret = Query.RegistryKeyExists(eLOCAL_MACHINE,"Software\\Novell");
Action.Trace("Reg Key Exists = " + ret);
VBScript:
dim ret
ret = Query.RegistryKeyExists(eLOCAL_MACHINE,"Software\\Novell")
Action.Trace("Reg Key Exists = " & ret)
JScript:
var ret;
ret = Query.RegistryKeyExists(eLOCAL_MACHINE,"Software\\Novell\\Logging");
Action.Trace("Reg Key Exists = " + ret);
ret = Query.RegistryValueDWORD(eLOCAL_MACHINE,"Software\\Novell\\Logging","Enabled");
Action.Trace("Reg Value = " + ret);
VBScript:
dim ret
ret = Query.RegistryKeyExists(eLOCAL_MACHINE,"Software\Novell\Logging")
Action.Trace("Reg Key Exists = " & ret)
ret = Query.RegistryValueDWORD(eLOCAL_MACHINE,"Software\Novell\Logging","Enabled")
Action.Trace("Reg Value = " & CLng(ret))
JScript:
var ret;
ret = Query.RegistryKeyExists(eLOCAL_MACHINE,"Software\\Novell\\Logging");
Action.Trace("Reg Key Exists = " + ret);
ret = Query.RegistryValueExists(eLOCAL_MACHINE,"Software\\Novell\\Logging","Enabled",eDWORD);
Action.Trace("Reg Value Exists = " + ret);
VBScript:
dim ret
ret = Query.RegistryKeyExists(eLOCAL_MACHINE,"Software\\Novell\\Logging")
Action.Trace("Reg Key Exists = " & ret)
ret = Query.RegistryValueExists(eLOCAL_MACHINE,"Software\\Novell\\Logging","Enabled",eDWORD)
Action.Trace("Reg Value Exists = " & ret)
JScript:
var ret;
ret = Query.RegistryKeyExists(eLOCAL_MACHINE,"Software\\Novell\\Logging");
Action.Trace("Reg Key Exists = " + ret);
ret = Query.RegistryValueString(eLOCAL_MACHINE,"Software\\Novell\\Logging","test");
Action.Trace("Reg Value Is = " + ret);
VBScript:
dim ret
ret = Query.RegistryKeyExists(eLOCAL_MACHINE,"Software\\Novell\\Logging")
Action.Trace("Reg Key Exists = " & ret)
ret = Query.RegistryValueString(eLOCAL_MACHINE,"Software\\Novell\\Logging","test")
Action.Trace("Reg Value Is = " & ret)
JScript:
var ret;
ret = Query.LocationName;
Action.Trace("Location Name = " + ret);
ret = Query.LocationUuid;
Action.Trace("Location Uuid = " + ret);
ret = Query.MaxConnectionSpeed;
Action.Trace("MaxConnectionSpeed = " + ret);
ret = Query.OSServicePack;
Action.Trace("OSServicePack = " + ret);
ret = Query.PolicyName;
Action.Trace("PolicyName = " + ret);
ret = Query.PolicyTime;
Action.Trace("PolicyTime = " + ret);
ret = Query.PolicyUuid;
Action.Trace("PolicyUuid = " + ret);
ret = Query.LocationIsStamped;
Action.Trace("LocationIsStamped = " + ret);
ret = Query.TriggerEvent;
Action.Trace("TriggerEvent = " + ret);
ret = Query.TriggerEventParameter;
Action.Trace("TriggerEventParameter = " + ret);
VBScript:
dim ret
ret = Query.LocationName
Action.Trace("Location Name = " & ret)
ret = Query.LocationUuid
Action.Trace("Location Uuid = " & ret)
ret = Query.MaxConnectionSpeed
Action.Trace("MaxConnectionSpeed = " & CLng(ret))
ret = Query.OSServicePack
Action.Trace("OSServicePack = " & ret)
ret = Query.PolicyName
Action.Trace("PolicyName = " & ret)
ret = Query.PolicyTime
Action.Trace("PolicyTime = " & ret)
ret = Query.PolicyUuid
Action.Trace("PolicyUuid = " & ret)
ret = Query.LocationIsStamped
Action.Trace("LocationIsStamped = " & ret)
ret = Query.TriggerEvent
Action.Trace("TriggerEvent = " & ret)
ret = Query.TriggerEventParameter
Action.Trace("TriggerEventParameter = " & ret)
JScript:
var ret;
Action.Trace("Reset Policy Change");
ret = Action.RemovableMediaState(-1, ePolicyChange);
Action.Trace("RemovableMediaState = " + ret);
ret = Action.CDMediaState(-1, ePolicyChange);
Action.Trace("CDMediaState = " + ret);
ret = Action.HDCState(eApplyGlobalSetting, eIrDA, ePolicyChange);
Action.Trace("\nHDCState(eApplyGlobalSetting, eIrDA) = " + ret);
ret = Action.HDCState(eApplyGlobalSetting, e1394, ePolicyChange);
Action.Trace("HDCState(eApplyGlobalSetting, e1394) = " + ret);
ret = Action.HDCState(eApplyGlobalSetting, eBlueTooth, ePolicyChange);
Action.Trace("HDCState(eApplyGlobalSetting, eBlueTooth) = " + ret);
ret = Action.HDCState(eApplyGlobalSetting, eSerialPort, ePolicyChange);
Action.Trace("HDCState(eApplyGlobalSetting, eSerialPort) = " + ret);
ret = Action.HDCState(eApplyGlobalSetting, eParrallelPort, ePolicyChange);
Action.Trace("HDCState(eApplyGlobalSetting, eParrallelPort) = " + ret);
ret = Action.WiFiDisabledState(eApplyGlobalSetting, ePolicyChange);
Action.Trace("\n WiFiDisabledState = " + ret);
ret = Action.WiFiDisabledWhenWiredState(eApplyGlobalSetting, ePolicyChange);
Action.Trace("WiFiDisabledWhenWiredState = " + ret);
ret = Action.AdHocDisabledState(eApplyGlobalSetting, ePolicyChange);
Action.Trace("AdHocDisabledState = " + ret);
ret = Action.AdapterBridgeDisabledState(eApplyGlobalSetting, ePolicyChange);
Action.Trace("AdapterBridgeDisabledState = " + ret);
ret = Action.MinimumWiFiSecurityState(eGlobalSetting, ePolicyChange);
Action.Trace("MinimumWiFiSecurityState = " + ret);
ret = Action.WiredDisabledState(eGlobalSetting, ePolicyChange);
Action.Trace("WiredDisabledState = " + ret);
ret = Action.DialupDisabledState(eGlobalSetting, ePolicyChange);
Action.Trace("DialupDisabledState = " + ret);
Action.Trace("Reset Location Change state");
ret = Action.RemovableMediaState(-1, eLocationChange);
Action.Trace("RemovableMediaState = " + ret);
ret = Action.CDMediaState(-1, eLocationChange);
Action.Trace("CDMediaState = " + ret);
ret = Action.HDCState(eApplyGlobalSetting, eIrDA, eLocationChange);
Action.Trace("\n HDCState(eApplyGlobalSetting, eIrDA) = " + ret);
ret = Action.HDCState(eApplyGlobalSetting, e1394, eLocationChange);
Action.Trace("HDCState(eApplyGlobalSetting, e1394) = " + ret);
ret = Action.HDCState(eApplyGlobalSetting, eBlueTooth, eLocationChange);
Action.Trace("HDCState(eApplyGlobalSetting, eBlueTooth) = " + ret);
ret = Action.HDCState(eApplyGlobalSetting, eSerialPort, eLocationChange);
Action.Trace("HDCState(eApplyGlobalSetting, eSerialPort) = " + ret);
ret = Action.HDCState(eApplyGlobalSetting, eParrallelPort, eLocationChange);
Action.Trace("HDCState(eApplyGlobalSetting, eParrallelPort) = " + ret);
ret = Action.WiFiDisabledState(eApplyGlobalSetting, eLocationChange);
Action.Trace("\n WiFiDisabledState = " + ret);
ret = Action.WiFiDisabledWhenWiredState(eApplyGlobalSetting, eLocationChange);
Action.Trace("WiFiDisabledWhenWiredState = " + ret);
ret = Action.AdHocDisabledState(eApplyGlobalSetting, eLocationChange);
Action.Trace("AdHocDisabledState = " + ret);
ret = Action.AdapterBridgeDisabledState(eApplyGlobalSetting, eLocationChange);
Action.Trace("AdapterBridgeDisabledState = " + ret);
ret = Action.MinimumWiFiSecurityState(eGlobalSetting, eLocationChange);
Action.Trace("MinimumWiFiSecurityState = " + ret);
ret = Action.WiredDisabledState(eGlobalSetting, eLocationChange);
Action.Trace("WiredDisabledState = " + ret);
ret = Action.DialupDisabledState(eGlobalSetting, eLocationChange);
Action.Trace("DialupDisabledState = " + ret);
VBScript:
dim ret;
Action.Trace("Reset Policy Change")
ret = Action.RemovableMediaState(-1, ePolicyChange)
Action.Trace("RemovableMediaState = " & ret)
ret = Action.CDMediaState(-1, ePolicyChange)
Action.Trace("CDMediaState = " & ret)
ret = Action.HDCState(eApplyGlobalSetting, eIrDA, ePolicyChange)
Action.Trace("\n HDCState(eApplyGlobalSetting, eIrDA) = " & ret)
ret = Action.HDCState(eApplyGlobalSetting, e1394, ePolicyChange)
Action.Trace("HDCState(eApplyGlobalSetting, e1394) = " & ret)
ret = Action.HDCState(eApplyGlobalSetting, eBlueTooth, ePolicyChange)
Action.Trace("HDCState(eApplyGlobalSetting, eBlueTooth) = " & ret)
ret = Action.HDCState(eApplyGlobalSetting, eSerialPort, ePolicyChange)
Action.Trace("HDCState(eApplyGlobalSetting, eSerialPort) = " & ret)
ret = Action.HDCState(eApplyGlobalSetting, eParrallelPort, ePolicyChange)
Action.Trace("HDCState(eApplyGlobalSetting, eParrallelPort) = " & ret)
ret = Action.WiFiDisabledState(eApplyGlobalSetting, ePolicyChange)
Action.Trace("\nWiFiDisabledState = " & ret)
ret = Action.WiFiDisabledWhenWiredState(eApplyGlobalSetting, ePolicyChange)
Action.Trace("WiFiDisabledWhenWiredState = " & ret)
ret = Action.AdHocDisabledState(eApplyGlobalSetting, ePolicyChange)
Action.Trace("AdHocDisabledState = " & ret)
ret = Action.AdapterBridgeDisabledState(eApplyGlobalSetting, ePolicyChange)
Action.Trace("AdapterBridgeDisabledState = " & ret)
ret = Action.MinimumWiFiSecurityState(eGlobalSetting, ePolicyChange)
Action.Trace("MinimumWiFiSecurityState = " & ret)
ret = Action.WiredDisabledState(eGlobalSetting, ePolicyChange)
Action.Trace("WiredDisabledState = " & ret)
ret = Action.DialupDisabledState(eGlobalSetting, ePolicyChange)
Action.Trace("DialupDisabledState = " & ret)
Action.Trace("Reset Location Change state")
ret = Action.RemovableMediaState(-1, eLocationChange)
Action.Trace("RemovableMediaState = " & ret)
ret = Action.CDMediaState(-1, eLocationChange)
Action.Trace("CDMediaState = " & ret)
ret = Action.HDCState(eApplyGlobalSetting, eIrDA, eLocationChange)
Action.Trace("\nHDCState(eApplyGlobalSetting, eIrDA) = " & ret)
ret = Action.HDCState(eApplyGlobalSetting, e1394, eLocationChange)
Action.Trace("HDCState(eApplyGlobalSetting, e1394) = " & ret)
ret = Action.HDCState(eApplyGlobalSetting, eBlueTooth, eLocationChange)
Action.Trace("HDCState(eApplyGlobalSetting, eBlueTooth) = " & ret)
ret = Action.HDCState(eApplyGlobalSetting, eSerialPort, eLocationChange)
Action.Trace("HDCState(eApplyGlobalSetting, eSerialPort) = " & ret)
ret = Action.HDCState(eApplyGlobalSetting, eParrallelPort, eLocationChange)
Action.Trace("HDCState(eApplyGlobalSetting, eParrallelPort) = " & ret)
ret = Action.WiFiDisabledState(eApplyGlobalSetting, eLocationChange)
Action.Trace("\nWiFiDisabledState = " & ret)
ret = Action.WiFiDisabledWhenWiredState(eApplyGlobalSetting, eLocationChange)
Action.Trace("WiFiDisabledWhenWiredState = " & ret)
ret = Action.AdHocDisabledState(eApplyGlobalSetting, eLocationChange)
Action.Trace("AdHocDisabledState = " & ret)
ret = Action.AdapterBridgeDisabledState(eApplyGlobalSetting, eLocationChange)
Action.Trace("AdapterBridgeDisabledState = " & ret)
ret = Action.MinimumWiFiSecurityState(eGlobalSetting, eLocationChange)
Action.Trace("MinimumWiFiSecurityState = " & ret)
ret = Action.WiredDisabledState(eGlobalSetting, eLocationChange)
Action.Trace("WiredDisabledState = " & ret)
ret = Action.DialupDisabledState(eGlobalSetting, eLocationChange)
Action.Trace("DialupDisabledState = " & ret)
JScript:
var ret;
Action.Trace("Status");
ret = Query.RemovableMediaState();
Action.Trace( "RemovableMediaState = " + ret);
ret = Query.CDMediaState();
Action.Trace( "CDMediaState = " + ret);
ret = Query.HDCState(eIrDA);
Action.Trace("\n HDCState(eIrDA) = " + ret);
ret = Query.HDCState(e1394);
Action.Trace( "HDCState(e1394) = " + ret);
ret = Query.HDCState(eBlueTooth);
Action.Trace( "HDCState(eBlueTooth) = " + ret);
ret = Query.HDCState(eSerialPort);
Action.Trace( "HDCState(eSerialPort) = " + ret);
ret = Query.HDCState(eParrallelPort);
Action.Trace( "HDCState(eParrallelPort) = " + ret);
ret = Query.IsWiFiDisabled();
Action.Trace("\n IsWiFiDisabled = " + ret);
ret = Query.IsWiFiDisabledWhenWired();
Action.Trace( "IsWiFiDisabledWhenWired = " + ret);
ret = Query.IsAdHocDisabled();
Action.Trace( "IsAdHocDisabled = " + ret);
ret = Query.IsAdapterBridgeDisabled();
Action.Trace( "IsAdapterBridgeDisabled = " + ret);
ret = Query.MinimumWiFiSecurityState();
Action.Trace( "MinimumWiFiSecurityState = " + ret);
ret = Query.IsWiredDisabled();
Action.Trace( "IsWiredDisabled = " + ret);
ret = Query.IsDialupDisabled();
Action.Trace( "IsDialupDisabled = " + ret);
VBScript:
dim ret;
Action.Trace("Status")
ret = Query.RemovableMediaState()
Action.Trace( "RemovableMediaState = " & ret)
ret = Query.CDMediaState()
Action.Trace( "CDMediaState = " & ret)
ret = Query.HDCState(eIrDA)
Action.Trace("\n HDCState(eIrDA) = " & ret)
ret = Query.HDCState(e1394)
Action.Trace( "HDCState(e1394) = " & ret)
ret = Query.HDCState(eBlueTooth)
Action.Trace( "HDCState(eBlueTooth) = " & ret)
ret = Query.HDCState(eSerialPort)
Action.Trace( "HDCState(eSerialPort) = " & ret)
ret = Query.HDCState(eParrallelPort)
Action.Trace( "HDCState(eParrallelPort) = " & ret)
ret = Query.IsWiFiDisabled()
Action.Trace("\n IsWiFiDisabled = " & ret)
ret = Query.IsWiFiDisabledWhenWired()
Action.Trace( "IsWiFiDisabledWhenWired = " & ret)
ret = Query.IsAdHocDisabled()
Action.Trace( "IsAdHocDisabled = " & ret)
ret = Query.IsAdapterBridgeDisabled()
Action.Trace( "IsAdapterBridgeDisabled = " & ret)
ret = Query.MinimumWiFiSecurityState()
Action.Trace( "MinimumWiFiSecurityState = " & ret)
ret = Query.IsWiredDisabled()
Action.Trace( "IsWiredDisabled = " & ret)
ret = Query.IsDialupDisabled()
Action.Trace( "IsDialupDisabled = " & ret)
There are two kinds of storage in the Security Client storage space. Persistent storage remains between sessions of the client, but transient storage exists only for the duration of the session. Transient values can be accessed in each rule script invocation. Also, persistent storage can only store and retrieve string values, and transient storage stores and retrieves the values that a VARIANT can hold.
Each script variable stored in the secure store is preceded by a rule id (one for each script). Variables that need to be shared between scripts must have a forward slash before the variable name in each persist function accessing them to make that variable global, or accessible, to each script.
The following is an example of a global variable (boolWarnedOnPreviousLoop) that can be shared between scripts:
Storage.PersistValueExists("/boolWarnedOnPreviousLoop");
JScript:
var ret;
Storage.SetNameValue("testval",5);
ret = Storage.NameValueExists("testval");
Action.Trace("NameValueExists = " + ret);
ret = Storage.GetNameValue("testval");
Action.Trace("GetNameValue = " + ret);
VBScript:
dim ret
Storage.SetNameValue "testval",5
ret = Storage.NameValueExists("testval")
Action.Trace("NameValueExists = " & ret)
ret = Storage.GetNameValue("testval")
Action.Trace("GetNameValue = " & ret)
JScript:
var ret;
Storage.SetPersistString("teststr","pstring");
ret = Storage.PersistValueExists("teststr");
Action.Trace("PersistValueExists = " + ret);
ret = Storage.GetPersistString("teststr");
Action.Trace("GetPersistString = " + ret);
VBScript:
dim ret
Storage.SetPersistString "teststr", "pstring"
ret = Storage.PersistValueExists("teststr")
Action.Trace("PersistValueExists = " & ret)
ret = Storage.GetPersistString("teststr")
Action.Trace("GetPersistString = " & ret)
JScript:
Storage.RuleState = true;
var ret = Storage.RuleState;
Action.Trace("RuleState = " + ret);
VBScript:
dim ret
Storage.RuleState = true
ret = Storage.RuleState
Action.Trace("RuleState = " & ret)
JScript:
var ret;
Storage.RetrySeconds = 30;
ret = Storage.RetrySeconds;
Action.Trace("RetrySeconds = " + ret);
VBScript:
dim ret
Storage.RetrySeconds = 30
ret = Storage.RetrySeconds
Action.Trace("RetrySeconds = " & ret)