Ivanti Application Control – Unlock

Unlocks the desktop by deploying a default configuration with Application Access Control, Advanced Network Access Control, and Trusted Ownership disabled. It also backs up your current config so it can be restored when the machine is re-locked.
Version 1.1.7
Created on 2018-05-18
Modified on 2018-05-24
Created by Landon Winburn
Downloads: 33

The Script Copy Script Copied to clipboard
Set WshShell = Wscript.CreateObject("Wscript.Shell")
Set FSO = Wscript.CreateObject("Scripting.FileSystemObject")

If NOT FSO.FileExists(WshShell.ExpandEnvironmentStrings("%allusersprofile%") & "\AppSense\Application Manager\Configuration\Configuration.aamp") Then
 Wscript.Echo "Application Control not installed."
 Wscript.Quit
End If

If FSO.FileExists(WshShell.ExpandEnvironmentStrings("%temp%") & "\Configuration.aamp") Then
 Wscript.Echo "Machine Unlocked."
 Wscript.Quit
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.LoadLiveConfiguration

Configuration.ParseXML ConfigurationXml
ConfigurationHelper.SaveLocalConfiguration WshShell.ExpandEnvironmentStrings("%temp%") & "\Configuration.aamp", Configuration.Xml

'Load the default configuration
Configuration.ParseXML ConfigurationHelper.DefaultConfiguration

Configuration.DefaultRules.TrustedOwnershipChecking = False
Configuration.DefaultRules.ApplicationAccessEnabled = False
Configuration.DefaultRules.ANACEnabled = False

'Save the blank configuration to file.
ConfigurationHelper.SaveLiveConfiguration Configuration.Xml

Wscript.Echo "Machine Unlocked."