11# Installation, Diagnostic and Repair Script for the N-Central Agent
22# Original Script Created by Tim Wiser
3- # Maintained by the Solarwinds MSP Community
3+ # Maintained by the N-able Community
44
55# ###############################
66# ######### Change Log ##########
77# ###############################
88
9+ # ## 6.0.1 on 2021-04-12 - David Brooks & Robby Swartenbroekx
10+ # #################################################################
11+ # See ReleaseNotes.md for all the changes
12+
913# ## 6.0.0 on 2021-02-01 - David Brooks
1014# #################################################################
1115# - Added various token registration method and agent activation methods
8084# HOUSEKEEPING
8185# - Re-published Change Log with most recent developments up top and some basic Categories for
8286# updates
83- # - Moved Script Execution Registry Key to HKLM:\SOFTWARE\Solarwinds MSP Community
87+ # - Moved Script Execution Registry Key to HKLM:\SOFTWARE\SolarWinds MSP Community
8488# - Added a Legacy Version Cleanup section which will automatically remove values/files created by
8589# older versions of the Script (Huge thanks to Tim and Jon for their contributions!)
8690#
@@ -191,8 +195,8 @@ if ($DebugMode.IsPresent) {
191195 if (Get-Module InstallAgent- Core) {
192196 Remove-Module InstallAgent- Core
193197 }
194- $AgentRegPath = " HKLM:\SOFTWARE\Solarwinds MSP Community\InstallAgent"
195- if (Test-Path $AgentRegPath ){
198+ $AgentRegPath = " HKLM:\SOFTWARE\N-able Community\InstallAgent"
199+ if (Test-Path $AgentRegPath ) {
196200 Remove-Item $AgentRegPath - Recurse - Force
197201 }
198202}
@@ -215,8 +219,8 @@ $NC.InstallParameters = @{
215219}
216220# Path Constants
217221$NC.Paths = @ {
218- " BinFolder" = " N-Able Technologies\Windows Agent\bin"
219- " ConfigFolder" = " N-Able Technologies\Windows Agent\config"
222+ " BinFolder" = " N-able Technologies\Windows Agent\bin"
223+ " ConfigFolder" = " N-able Technologies\Windows Agent\config"
220224 " UninstallKey32" = " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
221225 " UninstallKey64" = " HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
222226}
@@ -286,7 +290,7 @@ $SC = @{
286290 }
287291 " RunningInstanceTimeout" = 30
288292 " ScriptEventLog" = " Application"
289- " ScriptVersion" = " 6.0.0 "
293+ " ScriptVersion" = " 6.0.1 "
290294 " SuccessScriptAction" = " Graceful Exit"
291295 " SuccessScriptResult" = " Script Completed Successfully"
292296}
@@ -309,88 +313,88 @@ $SC.ExitTypes = @{
309313 " E" = " Report This Error"
310314}
311315$SC.Exit = @ {
312- " Error" = @ {
316+ " Error" = @ {
313317 " ExitResult" = " Undocumented Error (See Event Log)"
314318 " ExitType" = $SC.ExitTypes.E
315319 }
316- " A" = @ {
320+ " A" = @ {
317321 " ExitResult" = $SC.SuccessScriptResult
318322 " ExitType" = $SC.ExitTypes.A
319323 }
320- " B" = @ {
324+ " B" = @ {
321325 " ExitResult" = " Partner Configuration File is Missing"
322326 " ExitType" = $SC.ExitTypes.B
323327 }
324- " C" = @ {
328+ " C" = @ {
325329 " ExitResult" = " Partner Configuration is Invalid"
326330 " ExitType" = $SC.ExitTypes.B
327331 }
328- " D" = @ {
332+ " D" = @ {
329333 " ExitResult" = " No Installation Sources Available"
330334 " ExitType" = $SC.ExitTypes.B
331335 }
332- " E" = @ {
336+ " E" = @ {
333337 " ExitResult" = " Installer File is Missing"
334338 " ExitType" = $SC.ExitTypes.B
335339 }
336- " F" = @ {
340+ " F" = @ {
337341 " ExitResult" = " Installer Version Mismatch"
338342 " ExitType" = $SC.ExitTypes.B
339343 }
340- " G" = @ {
344+ " G" = @ {
341345 " ExitResult" = (" Unable to Reach " + $NC.Products.NCServer.Name )
342346 " ExitType" = $SC.ExitTypes.C
343347 }
344- " H" = @ {
348+ " H" = @ {
345349 " ExitResult" = " Customer ID Parameter Required"
346350 " ExitType" = $SC.ExitTypes.B
347351 }
348- " I" = @ {
352+ " I" = @ {
349353 " ExitResult" = " Customer ID Parameter Invalid"
350354 " ExitType" = $SC.ExitTypes.B
351355 }
352- " J" = @ {
356+ " J" = @ {
353357 " ExitResult" = " Windows Installer Service Unavailable"
354358 " ExitType" = $SC.ExitTypes.D
355359 }
356- " K" = @ {
360+ " K" = @ {
357361 " ExitResult" = " .NET Framework Installation Failed"
358362 " ExitType" = $SC.ExitTypes.D
359363 }
360- " L" = @ {
364+ " L" = @ {
361365 " ExitResult" = " Agent Removal Failed"
362366 " ExitType" = $SC.ExitTypes.D
363367 }
364- " M" = @ {
368+ " M" = @ {
365369 " ExitResult" = " No Installation Methods Remaining"
366370 " ExitType" = $SC.ExitTypes.D
367371 }
368- " AA" = @ {
372+ " AA" = @ {
369373 " ExitMessage" = " An invalid Parameter value or type was provided to a Script Function."
370374 " ExitResult" = " Invalid Parameter"
371375 " ExitType" = $SC.ExitTypes.E
372376 }
373- " AB" = @ {
377+ " AB" = @ {
374378 " ExitMessage" = (" The current " + $NC.Products.Agent.Name + " installation requires repair, but no Repairs were selected to be applied." )
375379 " ExitResult" = " No Repairs Selected"
376380 " ExitType" = $SC.ExitTypes.E
377381 }
378- " AC" = @ {
382+ " AC" = @ {
379383 " ExitMessage" = " An error occurred during a file transfer and the Script cannot proceed."
380384 " ExitResult" = " File Transfer Failed"
381385 " ExitType" = $SC.ExitTypes.E
382386 }
383- " AD" = @ {
387+ " AD" = @ {
384388 " ExitMessage" = " The file at the specified path does not exist."
385389 " ExitResult" = " File Not Found"
386390 " ExitType" = $SC.ExitTypes.E
387391 }
388- " AE" = @ {
392+ " AE" = @ {
389393 " ExitMessage" = " An error occurred during item creation and the Script cannot proceed."
390394 " ExitResult" = " File/Folder Creation Failed"
391395 " ExitType" = $SC.ExitTypes.E
392396 }
393- " LEGACY " = @ {
397+ " AF " = @ {
394398 " ExitMessage" = " The agent could not be installed on this legacy platform."
395399 " ExitResult" = " Legacy installation unavailable"
396400 " ExitType" = $SC.ExitTypes.E
@@ -482,7 +486,7 @@ $SC.Names = @{
482486}
483487# Path Constants
484488$SC.Paths = @ {
485- " ExecutionKey" = " HKLM:\SOFTWARE\Solarwinds MSP Community"
489+ " ExecutionKey" = " HKLM:\SOFTWARE\N-able Community"
486490 " ServiceKey" = " HKLM:\SYSTEM\CurrentControlSet\Services"
487491 " TempFolder" = Split-Path $MyInvocation.MyCommand.Path - Parent
488492}
@@ -575,13 +579,14 @@ $SC.Validation = @{
575579}
576580# ## Retired Values - PLACE RETIRED VALUES HERE TO CLEANUP OLD SCRIPT ENTRIES
577581$SC.Paths.Old = @ {
578- " ExecutionKeyTim" = " HKLM:\SOFTWARE\Tim Wiser"
579- " ExecutionKey" = " HKLM:\SOFTWARE\N-Central"
580- " EventKey" = " HKLM:\SYSTEM\CurrentControlSet\Services\EventLog\InstallAgent"
582+ " ExecutionKeySolarWinds" = " HKLM:\SOFTWARE\SolarWinds MSP Community"
583+ " ExecutionKeyTim" = " HKLM:\SOFTWARE\Tim Wiser"
584+ " ExecutionKey" = " HKLM:\SOFTWARE\N-Central"
585+ " EventKey" = " HKLM:\SYSTEM\CurrentControlSet\Services\EventLog\InstallAgent"
581586}
582587
583588function GetCustomInstallMethods {
584- # An empty function for a partner to override and update/insert custom install information
589+ # An empty function for a partner to override and update/insert custom install information
585590}
586591
587592
0 commit comments