Create Rename Installed App.ps1

Updated the registry entry to rename Tactical RMM Agent to your desired name
This commit is contained in:
bradhawkins85 2020-09-03 10:07:12 +10:00 committed by GitHub
parent 4371f27056
commit 4cd5932543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
$NewAgentName = $args[0]
$AgentName = (Get-ItemProperty "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{0D34D278-5FAF-4159-A4A0-4E2D2C08139D}_is1").DisplayName
if ($AgentName -ne "$NewAgentName") {
Set-ItemProperty -Name DisplayName -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{0D34D278-5FAF-4159-A4A0-4E2D2C08139D}_is1" -Value $NewAgentName
$AgentName = (Get-ItemProperty "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{0D34D278-5FAF-4159-A4A0-4E2D2C08139D}_is1").DisplayName
if ($AgentName -ne $NewAgentName) {
exit 1
} else {
exit 0
}
}