Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions KACE-Alert.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Launch, Control, and Track the KACE Alert dialog windows.

.DESCRIPTION
You can use KACE-Prompt to launch, udpate, or destroy KACE Agent Alert windows.
You can use KACE-Prompt to launch, update, or destroy KACE Agent Alert windows.

.PARAMETER Name
Required parameter, unique string that identifies the alert window for updates or termination. This string also appears in the header bar of the alert window.
Expand All @@ -15,10 +15,10 @@
Main block of text to appear in alert window.

.PARAMETER Update
Update the message text in an alert window without changing any other paraemters of the alert.
Update the message text in an alert window without changing any other parameters of the alert.

.PARAMETER Append
Update the message text and append to existing text in an alert window without changing any other paraemters of the alert.
Update the message text and append to existing text in an alert window without changing any other parameters of the alert.

.PARAMETER Timeout
Time (in seconds) to leave an alert on screen before timing out and closing. (Default is 43200, or 12 hours.)
Expand Down Expand Up @@ -187,13 +187,13 @@ function Get-StringHash([String] $String,$HashName = "MD5") {
###################################

#
$AlertMesgDir=$env:ProgramData+"\Dell\KACE\user\"
$AlertMesgDir=$env:ProgramData+"\Quest\KACE\user\"
# Alert prefix is standard, set it here for building alert indicator file paths later
$AlertIndicatorPrefix=$AlertMesgDir+"KUSERALERT_"
# The alert indicator files use a file extension that is a MD5 hash of the "Name" field.
$IndicatorExt=Get-StringHash($Name)
# Set path to KUserAlert.exe based on OS Architecture, since KACE Agent is only 32-bit, this is pretty easy.
If (Test-Path "$Env:SYSTEMDRIVE\Program Files (x86)" -PathType Container) {$AlertPath = $env:SYSTEMDRIVE+"\Program Files (x86)\Dell\KACE\KUserAlert.exe"} Else {$AlertPath = $env:SYSTEMDRIVE+"\Program Files\Dell\KACE\KUserAlert.exe"}
# Set path to KUserAlert.exe.
$AlertPath = $env:SYSTEMDRIVE+"\Program Files\Quest\KACE\KUserAlert.exe"
# Make sure the KUserAlert.exe file is present as expected.
If (-not (Test-Path $AlertPath)) {
If ($Silent) { ExitWithCode 2 "KUSERALERT_MISSING" }
Expand Down Expand Up @@ -418,3 +418,6 @@ Else {
}
}
}