'*************** Functions to do each action
Function DisableWirelessAdapters()
Dim ret
'NOTE:
1 means this action can be undone on a location change if
the policy allows
'
0 means this action can be undone on a policy update if the policy
allows
ret = Action.WiFiDisabledState(eDisableAccess, 1)
Action.Trace("Disallow Wi-Fi = " & ret)
'Again, per the customer request, Modems will be disabled to deal with 3G
wireless cards that act as modems in the network stack
ret = Action.DialupDisabledState ( eDisableAccess , 1 )
Action.Trace("Disallow Modem = " & ret)
End Function
Function CreateStartMenuProgramFilesShortcut()
'create the Start Menu folder and then create the shortcut
set oShellLinkStartMenu = WshShell.CreateShortcut (strStartMenu &
"\Novell\Enable Wireless Adapter Control.lnk")
oShellLinkStartMenu.TargetPath = "C:\Program Files\Novell ZENworks\Endpoint
Security Client\wareg.vbs"
oShellLinkStartMenu.WindowStyle = 1
oShellLinkStartMenu.Hotkey = "CTRL+SHIFT+W"
oShellLinkStartMenu.IconLocation = "C:\Program Files\Novell
ZENworks\Endpoint Security Client\STEngine.exe, 0"
oShellLinkStartMenu.Description = "Launch Novell Wireless Adapter Control
Dialog Box"
oShellLinkStartMenu.WorkingDirectory = "C:\Program Files\Novell
ZENworks\Endpoint Security Client"
oShellLinkStartMenu.Save
End Function
Function CreateDesktopAllUsersShortcut()
'create the desktop folder shortcut
set oShellLinkDesktop = WshShell.CreateShortcut (strDesktop & "\Enable
Wireless Adapter Control.lnk")
oShellLinkDesktop.TargetPath = "C:\Program Files\Novell ZENworks\Endpoint
Security Client\wareg.vbs"
oShellLinkDesktop.WindowStyle = 1
oShellLinkDesktop.Hotkey = "CTRL+SHIFT+W"
oShellLinkDesktop.IconLocation = "C:\Program
Files\Novell ZENworks\Endpoint Security Client\STEngine.exe, 0"
oShellLinkDesktop.Description = "Launch Novell Wireless Adapter
Control Dialog Box"
oShellLinkDesktop.WorkingDirectory = "C:\Program
Files\Novell ZENworks\Endpoint Security Client"
oShellLinkDesktop.Save
End Function
Function CreateVbsFileToWriteRegEntry()
'First build the VBScript file to write the registry key
Dim pathToTempVbsFile
pathToTempVbsFile = "C:\Program Files\Novell ZENworks\Endpoint Security
Client\wareg.vbs"
Dim ofileSysObj, fileHandle
set ofileSysObj = CreateObject ( "Scripting.FileSystemObject" )
set fileHandle = ofileSysObj.CreateTextFile ( pathToTempVbsFile , true )
fileHandle.WriteLine "Dim WshShell"
fileHandle.WriteLine "Set WshShell = CreateObject(""WScript.Shell"")"
Creating and Distributing Security Policies 171
Need help?
Do you have a question about the ZENWORKS ENDPOINT SECURITY MANAGEMENT 3.5 - ADMINISTRATION and is the answer not in the manual?