<< Back to Script Library

Ivanti Application Control – Lock

Takes the previously backed up configuration and restore it to the running live configuration.

Version: 1.1.5
Created: 2018-05-18
Modified: 2018-05-18
Creator: Landon Winburn
Downloads: 25
The Script Try this script with ControlUp Copy Script Copied to clipboard
Set WshShell = Wscript.CreateObject("Wscript.Shell")
Set FSO = Wscript.CreateObject("Scripting.FileSystemObject")

If NOT FSO.FileExists(WshShell.ExpandEnvironmentStrings("%allusersprofile%") & "AppSenseApplication ManagerConfigurationConfiguration.aamp") Then
	Wscript.Echo "Application Control not installed."
End If

If NOT FSO.FileExists(WshShell.ExpandEnvironmentStrings("%temp%") & "Configuration.aamp") Then
	Wscript.Echo "Machine Locked."
End If

'Create the configuration
Dim Configuration
Set Configuration = CreateObject("AM.Configuration.5")

'Create the configuration helper
Dim ConfigurationHelper
Set ConfigurationHelper = CreateObject("AM.ConfigurationHelper.1")

Dim ConfigurationXML
ConfigurationXML = ConfigurationHelper.LoadLocalConfiguration(WshShell.ExpandEnvironmentStrings("%temp%") & "Configuration.aamp")

Configuration.ParseXML ConfigurationXml
ConfigurationHelper.SaveLiveConfiguration Configuration.Xml

FSO.DeleteFile WshShell.ExpandEnvironmentStrings("%temp%") & "Configuration.aamp"

Wscript.Echo "Machine Locked."

Get Your Download Link

Gain access to ControlUp from your PC. Register and get a link to start your Free Trial.