Post installation message is running before installation is finished

Hi all,

I’m new to PS AppDeploy Toolkit.
Everything seems nice and easy, but I think I’m missing something.

I have to create (urgently) an Uninstall script for a software that’s installed on 2000+ computers.
It should be interactive because there are some applications that need to be closed and a restart will be necessary.

I need to execute two msiexec /x because the uninstall is password protected and I need to pass the password as a parameter.
There are two possible passwords, so I have to execute msiexec /x two times with different passwords.
Also, the application has two possible names in Add/Remove Programs.
with different GUID’s because after an update they’ve changed the name of the client.

The problem is, the script doesn’t wait for msiexec to finish.
It immediately displays the post-installtion part.
Which in my case is Show-InstallationPrompt -Message ‘custom message’.

I have tried to use both Remove-MSIApplications and Execute-MSI passing the GUID as a parameter.

Is there any way to actualy wait for the install/uninstall part to finish before continuing with the script?
Or am I missing something?

btw…
Here is the script. I forgot in the first post.

/edit
Somehow I cannot put the code between the code tags.
I’ll just paste it as is.

[CmdletBinding()]
Param (
[Parameter(Mandatory=$false)]
[ValidateSet(‘Install’,‘Uninstall’)]
[string]$DeploymentType = ‘Install’,
[Parameter(Mandatory=$false)]
[ValidateSet(‘Interactive’,‘Silent’,‘NonInteractive’)]
[string]$DeployMode = ‘Interactive’,
[Parameter(Mandatory=$false)]
[switch]$AllowRebootPassThru = $false,
[Parameter(Mandatory=$false)]
[switch]$TerminalServerMode = $false,
[Parameter(Mandatory=$false)]
[switch]$DisableLogging = $false
)

Try {
## Set the script execution policy for this process
Try { Set-ExecutionPolicy -ExecutionPolicy ‘ByPass’ -Scope ‘Process’ -Force -ErrorAction ‘Stop’ } Catch {}

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = 'Websense'
[string]$appName = 'Websense'
[string]$appVersion = ''
[string]$appArch = ''
[string]$appLang = 'EN'
[string]$appRevision = '01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '12/01/2016'
[string]$appScriptAuthor = 'xxx'
##*===============================================

##* Do not modify section below
#region DoNotModify

## Variables: Exit Code
[int32]$mainExitCode = 0

## Variables: Script
[string]$deployAppScriptFriendlyName = 'Deploy Application'
[version]$deployAppScriptVersion = [version]'3.6.5'
[string]$deployAppScriptDate = '08/17/2015'
[hashtable]$deployAppScriptParameters = $psBoundParameters

## Variables: Environment
If (Test-Path -LiteralPath 'variable:HostInvocation') { $InvocationInfo = $HostInvocation } Else { $InvocationInfo = $MyInvocation }
[string]$scriptDirectory = Split-Path -Path $InvocationInfo.MyCommand.Definition -Parent

## Dot source the required App Deploy Toolkit Functions
Try {
	[string]$moduleAppDeployToolkitMain = "$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"
	If (-not (Test-Path -LiteralPath $moduleAppDeployToolkitMain -PathType 'Leaf')) { Throw "Module does not exist at the specified location [$moduleAppDeployToolkitMain]." }
	If ($DisableLogging) { . $moduleAppDeployToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
}
Catch {
	If ($mainExitCode -eq 0){ [int32]$mainExitCode = 60008 }
	Write-Error -Message "Module [$moduleAppDeployToolkitMain] failed to load: <code>n$($_.Exception.Message)</code>n `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
	## Exit the script, returning the exit code to SCCM
	If (Test-Path -LiteralPath 'variable:HostInvocation') { $script:ExitCode = $mainExitCode; Exit } Else { Exit $mainExitCode }
}

#endregion
##* Do not modify section above
##*===============================================
##* END VARIABLE DECLARATION
##*===============================================
	
If ($deploymentType -ine 'Uninstall') {
	##*===============================================
	##* PRE-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Pre-Installation'
	
	## Show Welcome Message, close Internet Explorer if required, allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt
	Show-InstallationWelcome -CloseApps 'iexplore=Internet Explorer,outlook=Microsoft Outlook,chrome=Google Chrome,wfica32=All Citrix applications' -AllowDefer -DeferTimes 5 -PersistPrompt -TopMost $true -CloseAppsCountdown 300
	
	## Show Progress Message (with the default message)
	Show-InstallationProgress
	
	## &lt;Perform Pre-Installation tasks here&gt;
	
	
	##*===============================================
	##* INSTALLATION 
	##*===============================================
	[string]$installPhase = 'Installation'
	
	## Handle Zero-Config MSI Installations
	If ($useDefaultMsi) {
		[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
		Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
	}
	
	## &lt;Perform Installation tasks here&gt;

    #$WebsenseGUID = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object {$_.DisplayName -eq "Websense Endpoint" -or $_.DisplayName -eq "TRITON AP-ENDPOINT"} | Select PSChildName

    $TRITONInstalled = Get-InstalledApplication -Name 'TRITON AP-ENDPOINT'
    $WebsenseInstalled = Get-InstalledApplication -Name 'Websense Endpoint'	

    if ($TRITONInstalled) {
        Remove-MSIApplications -Name 'Websense Endpoint' -Parameters '/norestart XPSWDPXY=Password1 /qn'
        Remove-MSIApplications -Name 'TRITON AP-ENDPOINT' -Parameters '/norestart XPSWDPXY=Password2/qn'
    } Elseif ($WebsenseInstalled) {
        Remove-MSIApplications -Name 'TRITON AP-ENDPOINT' -Parameters '/norestart XPSWDPXY=Password1/qn'
        Remove-MSIApplications -Name 'TRITON AP-ENDPOINT' -Parameters '/norestart XPSWDPXY=Password2/qn'
    }


	##*===============================================
	##* POST-INSTALLATION
	##*===============================================
	[string]$installPhase = 'Post-Installation'
	
	## &lt;Perform Post-Installation tasks here&gt;
	
	## Display a message at the end of the install
	If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'Websense has been uninstalled. Please reboot your computer now.' -ButtonRightText 'OK' -Icon Information -NoWait }
}
ElseIf ($deploymentType -ieq 'Uninstall')
{
	##*===============================================
	##* PRE-UNINSTALLATION
	##*===============================================
	[string]$installPhase = 'Pre-Uninstallation'
	
	## Show Welcome Message, close Internet Explorer with a 60 second countdown before automatically closing
	Show-InstallationWelcome -CloseApps 'iexplore=Internet Explorer,outlook=Microsoft Outlook,chrome=Google Chrome,wfica32=All Citrix applications' -AllowDefer -DeferTimes 5 -PersistPrompt -TopMost $true -CloseAppsCountdown 300
	
	## Show Progress Message (with the default message)
	Show-InstallationProgress
	
	## &lt;Perform Pre-Uninstallation tasks here&gt;
	
	
	##*===============================================
	##* UNINSTALLATION
	##*===============================================
	[string]$installPhase = 'Uninstallation'
	
	## Handle Zero-Config MSI Uninstallations
	If ($useDefaultMsi) {
		[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Uninstall'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
		Execute-MSI @ExecuteDefaultMSISplat
	}
	
	# &lt;Perform Uninstallation tasks here&gt;
    $TRITONInstalled = Get-InstalledApplication -Name 'TRITON AP-ENDPOINT'
    $WebsenseInstalled = Get-InstalledApplication -Name 'Websense Endpoint'	

    if ($TRITONInstalled) {
        Remove-MSIApplications -Name 'Websense Endpoint' -Parameters '/norestart XPSWDPXY=Password1 /qn'
        Remove-MSIApplications -Name 'TRITON AP-ENDPOINT' -Parameters '/norestart XPSWDPXY=Password2/qn'
    } Elseif ($WebsenseInstalled) {
        Remove-MSIApplications -Name 'TRITON AP-ENDPOINT' -Parameters '/norestart XPSWDPXY=Password1/qn'
        Remove-MSIApplications -Name 'TRITON AP-ENDPOINT' -Parameters '/norestart XPSWDPXY=Password2/qn'
    }
	
	
	##*===============================================
	##* POST-UNINSTALLATION
	##*===============================================
	[string]$installPhase = 'Post-Uninstallation'
	
	## &lt;Perform Post-Uninstallation tasks here&gt;
			If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'Websense has been uninstalled. Please reboot your computer now.' -ButtonRightText 'OK' -Icon Information -NoWait }
}

##*===============================================
##* END SCRIPT BODY
##*===============================================

## Call the Exit-Script function to perform final cleanup operations
Exit-Script -ExitCode $mainExitCode

}
Catch {
[int32]$mainExitCode = 60001
[string]$mainErrorMessage = “$(Resolve-Error)”
Write-Log -Message $mainErrorMessage -Severity 3 -Source $deployAppScriptFriendlyName
Show-DialogBox -Text $mainErrorMessage -Icon ‘Stop’
Exit-Script -ExitCode $mainExitCode
}

Remove-MSIApplications waits for msiexec to finish before continuing. What does the logs under C:\Windows\Logs\Software show?

I have added a sleep of 30s after the Remove-MSIApplications and now it works fine.
The problem is now that on some computers it is completely hidden.
Don’t know why.
Users on those computers are not administrators.

The installation string that I’ve tried are:
“Deploy-Application.exe” -DeploymentType “Install” -DeployMode “Interactive”
and
“Deploy-Application.exe” Install Interactive

See log file:

<![LOG[[Initialization] :: *******************************************************************************]LOG]!><time="11:31:44.13360" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: *******************************************************************************]LOG]!><time="11:31:44.13360" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: [Websense_Endpoint_EN_01] setup started.]LOG]!><time="11:31:44.54560" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: Script [C:\WINDOWS\ccmcache\63\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\WINDOWS\ccmcache\63\Deploy-Application.ps1]]LOG]!><time="11:31:44.67960" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: Script [C:\WINDOWS\ccmcache\63\AppDeployToolkit\AppDeployToolkitExtensions.ps1] dot-source invoked by [C:\WINDOWS\ccmcache\63\AppDeployToolkit\AppDeployToolkitMain.ps1]]LOG]!><time="11:31:44.72360" date="01-14-2016" component="PSAppDeployToolkitExt" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitExtensions.ps1"> <![LOG[[Initialization] :: [Websense_Endpoint_EN_01] script version is [1.0.0]]LOG]!><time="11:31:44.83860" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: [Deploy Application] script version is [3.6.5]]LOG]!><time="11:31:44.84660" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: The following non-default parameters were passed to [Deploy Application]: [-DeploymentType "Install" -DeployMode "Interactive"]]LOG]!><time="11:31:44.87860" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: [App Deploy Toolkit Main] script version is [3.6.7]]LOG]!><time="11:31:44.88660" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: [App Deploy Toolkit Extensions] version is [1.5.0]]LOG]!><time="11:31:44.89660" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: Computer Name is [xxx]]LOG]!><time="11:31:44.90560" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: Current User is [NT AUTHORITY\SYSTEM]]LOG]!><time="11:31:44.91260" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: OS Version is [Microsoft Windows 8.1 Pro 64-bit 6.3.9600.0]]LOG]!><time="11:31:44.92060" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: OS Type is [Workstation]]LOG]!><time="11:31:44.92860" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: Current Culture is [en-US] and UI language is [EN]]LOG]!><time="11:31:44.94460" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: Hardware Platform is [Physical]]LOG]!><time="11:31:45.30160" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: PowerShell Host is [ConsoleHost] with version [4.0]]LOG]!><time="11:31:45.33660" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: PowerShell Version is [4.0 x64]]LOG]!><time="11:31:45.34560" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: PowerShell CLR (.NET) version is [4.0.30319.34014]]LOG]!><time="11:31:45.35460" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: *******************************************************************************]LOG]!><time="11:31:45.36560" date="01-14-2016" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="10672" file="AppDeployToolkitMain.ps1"> <![LOG[[Initialization] :: Display session information for all logged on users:

NTAccount : xxx
SID : xxx
UserName : xxx
DomainName : xxx
SessionId : 2
SessionName : Console
ConnectState : Active
IsCurrentSession : False
IsConsoleSession : True
IsActiveUserSession : True
IsUserSession : True
IsRdpSession : False
IsLocalAdmin : False
LogonTime : 1/11/2016 7:22:58 AM
IdleTime : 5.19:37:25.5077124
DisconnectTime : 1/8/2016 3:47:10 PM
ClientName :
ClientProtocolType :
ClientDirectory :
ClientBuildNumber : 0

]LOG]!><time=“11:31:46.77660” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The following users are logged on to the system: [xxx].]LOG]!><time=“11:31:46.78960” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Current process is running under a system account [NT AUTHORITY\SYSTEM].]LOG]!><time=“11:31:46.80160” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The following user is the console user [xxx] (user with control of physical monitor, keyboard, and mouse).]LOG]!><time=“11:31:46.81460” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The active logged on user is [xxx].]LOG]!><time=“11:31:46.82760” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The active logged on user [xxx] has a primary UI language of [EN].]LOG]!><time=“11:31:46.83960” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The config XML file was configured to override the detected primary UI language with the following UI language: [EN].]LOG]!><time=“11:31:46.85260” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The following UI messages were imported from the config XML file: [UI_Messages_EN].]LOG]!><time=“11:31:46.86660” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The active logged on user [xxx] has a DPI scale factor of [100] with DPI pixels [96].]LOG]!><time=“11:31:46.87960” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence.]LOG]!><time=“11:31:47.02160” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [EventSystem] exists.]LOG]!><time=“11:31:47.42460” date=“01-14-2016” component=“Test-ServiceExists” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Get the service [EventSystem] startup mode.]LOG]!><time=“11:31:47.49560” date=“01-14-2016” component=“Get-ServiceStartMode” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [EventSystem] startup mode is set to [Automatic].]LOG]!><time=“11:31:47.75660” date=“01-14-2016” component=“Get-ServiceStartMode” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Get the service object for service [EventSystem].]LOG]!><time=“11:31:47.82660” date=“01-14-2016” component=“Start-ServiceAndDependencies” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [EventSystem] with display name [COM+ Event System] has a status of [Running].]LOG]!><time=“11:31:47.90860” date=“01-14-2016” component=“Start-ServiceAndDependencies” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [RpcSs] exists.]LOG]!><time=“11:31:48.15960” date=“01-14-2016” component=“Test-ServiceExists” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Get the service [RpcSs] startup mode.]LOG]!><time=“11:31:48.18960” date=“01-14-2016” component=“Get-ServiceStartMode” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [RpcSs] startup mode is set to [Automatic].]LOG]!><time=“11:31:48.42960” date=“01-14-2016” component=“Get-ServiceStartMode” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Get the service object for service [RpcSs].]LOG]!><time=“11:31:48.44760” date=“01-14-2016” component=“Start-ServiceAndDependencies” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [RpcSs] with display name [Remote Procedure Call (RPC)] has a status of [Running].]LOG]!><time=“11:31:48.45560” date=“01-14-2016” component=“Start-ServiceAndDependencies” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [EventLog] exists.]LOG]!><time=“11:31:48.70360” date=“01-14-2016” component=“Test-ServiceExists” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Get the service [EventLog] startup mode.]LOG]!><time=“11:31:48.72060” date=“01-14-2016” component=“Get-ServiceStartMode” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [EventLog] startup mode is set to [Automatic].]LOG]!><time=“11:31:48.94360” date=“01-14-2016” component=“Get-ServiceStartMode” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Get the service object for service [EventLog].]LOG]!><time=“11:31:48.96160” date=“01-14-2016” component=“Start-ServiceAndDependencies” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [EventLog] with display name [Windows Event Log] has a status of [Running].]LOG]!><time=“11:31:48.97060” date=“01-14-2016” component=“Start-ServiceAndDependencies” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [Schedule] exists.]LOG]!><time=“11:31:49.21760” date=“01-14-2016” component=“Test-ServiceExists” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Get the service [Schedule] startup mode.]LOG]!><time=“11:31:49.23960” date=“01-14-2016” component=“Get-ServiceStartMode” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [Schedule] startup mode is set to [Automatic].]LOG]!><time=“11:31:49.46360” date=“01-14-2016” component=“Get-ServiceStartMode” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Get the service object for service [Schedule].]LOG]!><time=“11:31:49.48460” date=“01-14-2016” component=“Start-ServiceAndDependencies” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [Schedule] with display name [Task Scheduler] has a status of [Running].]LOG]!><time=“11:31:49.49460” date=“01-14-2016” component=“Start-ServiceAndDependencies” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The task scheduler service is in a healthy state: True.]LOG]!><time=“11:31:49.51060” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Session 0 detected, process not running in user interactive mode; deployment mode set to [NonInteractive].]LOG]!><time=“11:31:49.51860” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Installation is running in [NonInteractive] mode.]LOG]!><time=“11:31:49.52660” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Deployment type is [Installation].]LOG]!><time=“11:31:49.53360” date=“01-14-2016” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Pre-Installation] :: Bypassing Installation Prompt [Mode: NonInteractive]… Websense is our solution for web security and web filtering that protects you from data theft, malware attacks, and much more.
In order to be able to uninstall the new version of Websense Endpoint the current version needs to be uninstalled first.

After Websense has been uninstalled you will have to restart your computer.]LOG]!><time=“11:31:49.77360” date=“01-14-2016” component=“Show-InstallationPrompt” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Pre-Installation] :: Get deferral history…]LOG]!><time=“11:31:54.93460” date=“01-14-2016” component=“Get-DeferHistory” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Pre-Installation] :: Return fully qualified registry key path [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeployToolkit\DeferHistory\Websense_Endpoint_EN_01].]LOG]!><time=“11:31:54.95460” date=“01-14-2016” component=“Convert-RegistryPath” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Pre-Installation] :: Registry key [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeployToolkit\DeferHistory\Websense_Endpoint_EN_01] does not exist.]LOG]!><time=“11:31:54.96560” date=“01-14-2016” component=“Get-RegistryKey” context=“NT AUTHORITY\SYSTEM” type=“2” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Pre-Installation] :: User has [4] deferrals remaining.]LOG]!><time=“11:31:54.98460” date=“01-14-2016” component=“Show-InstallationWelcome” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Pre-Installation] :: Check for running application(s) [iexplore,outlook,chrome,wfica32]…]LOG]!><time=“11:31:55.03060” date=“01-14-2016” component=“Get-RunningProcesses” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Pre-Installation] :: The following processes are running: [chrome,iexplore,OUTLOOK,wfica32].]LOG]!><time=“11:31:55.12760” date=“01-14-2016” component=“Get-RunningProcesses” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Pre-Installation] :: Resolve process descriptions…]LOG]!><time=“11:31:55.13660” date=“01-14-2016” component=“Get-RunningProcesses” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Pre-Installation] :: Finished checking running application(s).]LOG]!><time=“11:31:55.20160” date=“01-14-2016” component=“Get-RunningProcesses” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Pre-Installation] :: Force close application(s) [All Citrix applications,Google Chrome,Internet Explorer,Microsoft Outlook] without prompting user.]LOG]!><time=“11:31:55.24160” date=“01-14-2016” component=“Show-InstallationWelcome” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Get information for installed Application Name(s) [TRITON AP-ENDPOINT]…]LOG]!><time=“11:32:02.95860” date=“01-14-2016” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Found installed application [TRITON AP-ENDPOINT] version [8.1.2224] using regex matching for search term [TRITON AP-ENDPOINT].]LOG]!><time=“11:32:03.42760” date=“01-14-2016” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Get information for installed Application Name(s) [Websense Endpoint]…]LOG]!><time=“11:32:03.49160” date=“01-14-2016” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Get information for installed Application Name(s) [TRITON AP-ENDPOINT]…]LOG]!><time=“11:32:03.94460” date=“01-14-2016” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Found installed application [TRITON AP-ENDPOINT] version [8.1.2224] using regex matching for search term [TRITON AP-ENDPOINT].]LOG]!><time=“11:32:04.28760” date=“01-14-2016” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Found [1] application(s) that matched the specified criteria [TRITON AP-ENDPOINT].]LOG]!><time=“11:32:04.35960” date=“01-14-2016” component=“Remove-MSIApplications” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Adding application to list for removal: [TRITON AP-ENDPOINT ].]LOG]!><time=“11:32:04.38660” date=“01-14-2016” component=“Remove-MSIApplications” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Remove application [TRITON AP-ENDPOINT ].]LOG]!><time=“11:32:04.44260” date=“01-14-2016” component=“Remove-MSIApplications” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Resolve product code to a publisher, application name, and version.]LOG]!><time=“11:32:04.49760” date=“01-14-2016” component=“Execute-MSI” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Get information for installed Product Code [{91AF04C4-CDA0-42B8-91C5-B547DE2127A1}]…]LOG]!><time=“11:32:04.51660” date=“01-14-2016” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Found installed application [TRITON AP-ENDPOINT] version [8.1.2224] matching product code [{91AF04C4-CDA0-42B8-91C5-B547DE2127A1}].]LOG]!><time=“11:32:04.80060” date=“01-14-2016” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Get information for installed Product Code [{91AF04C4-CDA0-42B8-91C5-B547DE2127A1}]…]LOG]!><time=“11:32:04.89460” date=“01-14-2016” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Found installed application [TRITON AP-ENDPOINT] version [8.1.2224] matching product code [{91AF04C4-CDA0-42B8-91C5-B547DE2127A1}].]LOG]!><time=“11:32:05.19860” date=“01-14-2016” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Executing MSI action [Uninstall]…]LOG]!><time=“11:32:05.21060” date=“01-14-2016” component=“Execute-MSI” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: [msiexec.exe] successfully resolved to fully qualified path [C:\WINDOWS\system32\msiexec.exe].]LOG]!><time=“11:32:05.34560” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Check to see if mutex [Global_MSIExecute] is available. Wait up to [10 minute(s)] for the mutex to become available.]LOG]!><time=“11:32:05.47960” date=“01-14-2016” component=“Test-IsMutexAvailable” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Mutex [Global_MSIExecute] is available for an exclusive lock.]LOG]!><time=“11:32:05.63960” date=“01-14-2016” component=“Test-IsMutexAvailable” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Working Directory is [C:\WINDOWS\system32].]LOG]!><time=“11:32:06.89460” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Executing [C:\WINDOWS\system32\msiexec.exe /x “{91AF04C4-CDA0-42B8-91C5-B547DE2127A1}” /norestart XPSWDPXY=W0ps@ns1 /qn /L*v “C:\WINDOWS\Logs\Software\Websense,Inc._TRITONAP-ENDPOINT_8.1.2224_Uninstall.log”]…]LOG]!><time=“11:32:06.91160” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Installation] :: Execution complete and the exit code [0] is being ignored.]LOG]!><time=“11:32:07.81360” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Create scheduled task to run the process [C:\WINDOWS\Regedit.exe /S C:\WINDOWS\ccmcache\63\SupportFiles\Uncheck-IEXUseAutomaticConfigurationScript.reg] as the logged-on user [xxx]…]LOG]!><time=“11:32:37.93960” date=“01-14-2016” component=“Execute-ProcessAsUser” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: [C:\WINDOWS\System32\schtasks.exe] is a valid fully qualified path, continue.]LOG]!><time=“11:32:37.96160” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Working Directory is [C:\WINDOWS\System32].]LOG]!><time=“11:32:37.97160” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Executing [C:\WINDOWS\System32\schtasks.exe /create /f /tn PSAppDeployToolkit-ExecuteAsUser /xml “C:\Users\Public\PSAppDeployToolkit\PSAppDeployToolkit-ExecuteAsUser.xml”]…]LOG]!><time=“11:32:37.97860” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Execution completed with exit code [0].]LOG]!><time=“11:32:38.16060” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Trigger execution of scheduled task with command [C:\WINDOWS\Regedit.exe /S C:\WINDOWS\ccmcache\63\SupportFiles\Uncheck-IEXUseAutomaticConfigurationScript.reg] as the logged-on user [xxx]…]LOG]!><time=“11:32:38.17960” date=“01-14-2016” component=“Execute-ProcessAsUser” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: [C:\WINDOWS\System32\schtasks.exe] is a valid fully qualified path, continue.]LOG]!><time=“11:32:38.19360” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Working Directory is [C:\WINDOWS\System32].]LOG]!><time=“11:32:38.20460” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Executing [C:\WINDOWS\System32\schtasks.exe /run /i /tn PSAppDeployToolkit-ExecuteAsUser]…]LOG]!><time=“11:32:38.21460” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Execution completed with exit code [0].]LOG]!><time=“11:32:38.30660” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Waiting for the process launched by the scheduled task [PSAppDeployToolkit-ExecuteAsUser] to complete execution (this may take some time)…]LOG]!><time=“11:32:38.31760” date=“01-14-2016” component=“Execute-ProcessAsUser” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Exit code from process launched by scheduled task [0].]LOG]!><time=“11:32:39.47860” date=“01-14-2016” component=“Execute-ProcessAsUser” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Delete scheduled task [PSAppDeployToolkit-ExecuteAsUser].]LOG]!><time=“11:32:39.48660” date=“01-14-2016” component=“Execute-ProcessAsUser” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: [C:\WINDOWS\System32\schtasks.exe] is a valid fully qualified path, continue.]LOG]!><time=“11:32:39.51060” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Working Directory is [C:\WINDOWS\System32].]LOG]!><time=“11:32:39.54060” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Executing [C:\WINDOWS\System32\schtasks.exe /delete /tn PSAppDeployToolkit-ExecuteAsUser /f]…]LOG]!><time=“11:32:39.54760” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Execution completed successfully with exit code [0].]LOG]!><time=“11:32:39.64760” date=“01-14-2016” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Bypassing Installation Prompt [Mode: NonInteractive]… Websense Endpoint has been uninstalled.

Please Reboot your computer to complete the uninstall process.

If you encounter problems please call the Help-Desk at +32 3 250 5599.]LOG]!><time=“11:32:39.66460” date=“01-14-2016” component=“Show-InstallationPrompt” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: Websense_Endpoint_EN_01 Installation completed with exit code [0].]LOG]!><time=“11:32:39.74260” date=“01-14-2016” component=“Exit-Script” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>
<![LOG[[Post-Installation] :: -------------------------------------------------------------------------------]LOG]!><time=“11:32:39.74960” date=“01-14-2016” component=“Exit-Script” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“10672” file=“Deploy-Application.ps1”>