Application Control powered by AppSense

Ivanti Application Control is the new name for AppSense Application Manager

Sample Script: Add User Privileges Component

The following VB Script adds a user privileges component:

const AM_URMControlPanelConstant_mmcComputerManagement = 0

const AM_URMControlPanelConstant_cplAddHardware = 1

const AM_URMControlPanelConstant_cplAddRemovePrograms = 2

const AM_URMControlPanelConstant_cplAddPlugPlay = 3

const AM_URMControlPanelConstant_cplAutomaticUpdatesSettings = 4

const AM_URMControlPanelConstant_cplClock = 5

const AM_URMControlPanelConstant_cplDesktopDPI = 6

const AM_URMControlPanelConstant_cplDisplay = 7

const AM_URMControlPanelConstant_cplInternetOptions = 8

const AM_URMControlPanelConstant_cplPowerOptions = 9

const AM_URMControlPanelConstant_cplRegional = 10

const AM_URMControlPanelConstant_cplSystem = 11

const AM_URMControlPanelConstant_cplFirewallSettings = 12

const AM_URMControlPanelConstant_mmcFirewallAdvanced = 13

const AM_URMControlPanelConstant_mmcDeviceManager = 14

const AM_URMControlPanelConstant_mmcDiskManagement = 15

const AM_URMControlPanelConstant_cplIndexingOptions = 16

const AM_URMControlPanelConstant_cplWindowsFeatures = 17

const AM_URMControlPanelConstant_mmcLocalSecurityPolicy = 18

const AM_URMControlPanelConstant_mmcPerformanceMonitor = 19

const AM_URMControlPanelConstant_cplLanguages = 20

const AM_URMControlPanelConstant_mmcServices = 21

const AM_URMControlPanelConstant_mmcDefrag = 27

const AM_URMControlPanelConstant_cplBackupRestore = 28

const AM_URMControlPanelConstant_cpliScsiInitiator = 29

const AM_URMControlPanelConstant_cplOfflineFiles = 30

const AM_URMControlPanelConstant_cpladaptors = 31

const AM_URMControlPanelConstant_cplprinters = 32

const AM_URMControlPanelConstant_mmcServerManager = 33

const AM_URMControlPanelConstant_cplSystemConfig = 34

const AM_URMControlPanelConstant_cplClearTypeText = 35

const AM_URMControlPanelConstant_cplCalibrateColor = 36

const AM_URMControlPanelConstant_mmcCompServices = 37

const AM_URMControlPanelConstant_cplRecoveryDisc = 38

const AM_URMControlPanelConstant_mmcCertManager = 39

const AM_URMControlPanelConstant_cplDataSources = 40

const AM_URMControlPanelConstant_cplRecoveryRestore = 41

const AM_URMControlPanelConstant_mmcTasksSchedule = 42

const AM_URMControlPanelConstant_mmcTrustedPlatform = 43

const AM_URMControlPanelConstant_cplTroubleShoot = 44

const AM_URMControlPanelConstant_cplBitLockerEnable = 45

const AM_URMControlPanelConstant_mmcEventViewer = 46

const AM_URMControlPanelConstant_cplEasyTransfer = 47

const AM_URMControlPanelConstant_cpladaptorsAdvancedSharing = 48

const AM_URMControlPanelConstant_cpladaptorsWirelessProfile = 49

const AM_URMControlPanelConstant_cpladaptorsWirelessPropertiesChars = 50

const AM_URMControlPanelConstant_cpladaptorsWirelessPropertiesCopyUSB = 51

const AM_URMControlPanelConstant_cpladaptorsNetworkConnectionProperties = 52

const AM_URMControlPanelConstant_cpladaptorsNetworkDisableConnection = 53

const AM_URMControlPanelConstant_cplFirewallSettingsControlPanel = 54

const AM_URMControlPanelConstant_cplFirewallSettingsActionCenter = 55

const AM_URMControlPanelConstant_cplProblemReporting = 56

const AM_URMControlPanelConstant_cplAddRemoveProgramsChange = 57

const AM_URMControlPanelConstant_cplAddRemoveProgramsUninstallUpdate = 58

const AM_URMControlPanelConstant_cplWindowsDefender = 59

const AM_URMControlPanelConstant_cplDefaultLocation = 60

const AM_URMControlPanelConstant_cplAccessCenter = 61

const AM_URMControlPanelConstant_cplExplorer = 62

const AM_URMControlPanelConstant_cplExplorerCheckDisk = 63

const AM_URMControlPanelConstant_cplExplorerEditGroupUser = 64

const AM_URMControlPanelConstant_cplExplorerPermissions = 65

const AM_URMControlPanelConstant_cplExplorerQuota = 66

const AM_URMControlPanelConstant_cplExplorerAdvancedSharing = 67

const AM_URMControlPanelConstant_cplIndexingOptionsAdvanced = 68

const AM_URMControlPanelConstant_cplIndexingOptionsShowAllLocations = 69

const AM_URMControlPanelConstant_cplIndexingOptionsPause = 70

const AM_URMControlPanelConstant_cplMediaSharing = 71

const AM_URMControlPanelConstant_cplUserAccounts = 72

const AM_URMControlPanelConstant_cplUserAccountsUserAccountControl = 73

const AM_URMControlPanelConstant_cplUserAccountsManageUserAccounts = 74

'BuiltinActions

const AM_ControlPanelURMPolicy_BuiltinElevate = 0

const AM_ControlPanelURMPolicy_BuiltinRestrict = 1

'Create the configuration

Dim Configuration

Set Configuration = CreateObject("AM.Configuration.5")

'Create the configuration helper

Dim ConfigurationHelper

Set ConfigurationHelper = CreateObject("AM.ConfigurationHelper.1")

'Load the live configuration

Dim ConfigurationXml

ConfigurationXml = ConfigurationHelper.LoadLiveConfiguration

Configuration.ParseXML ConfigurationXml

Dim Applet

Set Applet =

Configuration.CreateInstanceFromClassName("AM.WellKnownControlPanelApplet")

Applet.Path = "cplClock"

Applet.ControlPanelId = AM_URMControlPanelConstant_cplClock

Applet.PolicyAction = AM_ControlPanelURMPolicy_BuiltinElevate

Dim DateTimeComponent

Set DateTimeComponent = Configuration.CreateInstanceFromClassName("AM.URMRuleItem")

DateTimeComponent.KeyPath = Applet.Path

DateTimeComponent.Application = Applet.Xml

Configuration.GroupRules.Item("Everyone").UserRightsRules.URMWellKnownControlPanelAp

plets.Add DateTimeComponent.Xml

Applet.Path = "mmcServices"

Applet.ControlPanelId = AM_URMControlPanelConstant_mmcServices

Applet.PolicyAction = AM_ControlPanelURMPolicy_BuiltinElevate

DateTimeComponent.KeyPath = Applet.Path

DateTimeComponent.Application = Applet.Xml

Configuration.GroupRules.Item("Everyone").UserRightsRules.URMWellKnownControlPanelAp

plets.Add DateTimeComponent.Xml

'Save the live configuration.

ConfigurationHelper.SaveLiveConfiguration Configuration.Xml

Set ConfigurationHelper = Nothing

Set Configuration = Nothing

Related topics


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other