1
1
# Installation, Diagnostic and Repair Script for the N-Central Agent
2
2
# Original Script Created by Tim Wiser
3
- # Maintained by the Solarwinds MSP Community
3
+ # Maintained by the N-able Community
4
4
5
5
# ###############################
6
6
# ######### Change Log ##########
7
7
# ###############################
8
8
9
+ # ## 6.0.1 on 2021-04-12 - David Brooks & Robby Swartenbroekx
10
+ # #################################################################
11
+ # See ReleaseNotes.md for all the changes
12
+
9
13
# ## 6.0.0 on 2021-02-01 - David Brooks
10
14
# #################################################################
11
15
# - Added various token registration method and agent activation methods
80
84
# HOUSEKEEPING
81
85
# - Re-published Change Log with most recent developments up top and some basic Categories for
82
86
# 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
84
88
# - Added a Legacy Version Cleanup section which will automatically remove values/files created by
85
89
# older versions of the Script (Huge thanks to Tim and Jon for their contributions!)
86
90
#
@@ -191,8 +195,8 @@ if ($DebugMode.IsPresent) {
191
195
if (Get-Module InstallAgent- Core) {
192
196
Remove-Module InstallAgent- Core
193
197
}
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 ) {
196
200
Remove-Item $AgentRegPath - Recurse - Force
197
201
}
198
202
}
@@ -215,8 +219,8 @@ $NC.InstallParameters = @{
215
219
}
216
220
# Path Constants
217
221
$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"
220
224
" UninstallKey32" = " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
221
225
" UninstallKey64" = " HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
222
226
}
@@ -286,7 +290,7 @@ $SC = @{
286
290
}
287
291
" RunningInstanceTimeout" = 30
288
292
" ScriptEventLog" = " Application"
289
- " ScriptVersion" = " 6.0.0 "
293
+ " ScriptVersion" = " 6.0.1 "
290
294
" SuccessScriptAction" = " Graceful Exit"
291
295
" SuccessScriptResult" = " Script Completed Successfully"
292
296
}
@@ -309,88 +313,88 @@ $SC.ExitTypes = @{
309
313
" E" = " Report This Error"
310
314
}
311
315
$SC.Exit = @ {
312
- " Error" = @ {
316
+ " Error" = @ {
313
317
" ExitResult" = " Undocumented Error (See Event Log)"
314
318
" ExitType" = $SC.ExitTypes.E
315
319
}
316
- " A" = @ {
320
+ " A" = @ {
317
321
" ExitResult" = $SC.SuccessScriptResult
318
322
" ExitType" = $SC.ExitTypes.A
319
323
}
320
- " B" = @ {
324
+ " B" = @ {
321
325
" ExitResult" = " Partner Configuration File is Missing"
322
326
" ExitType" = $SC.ExitTypes.B
323
327
}
324
- " C" = @ {
328
+ " C" = @ {
325
329
" ExitResult" = " Partner Configuration is Invalid"
326
330
" ExitType" = $SC.ExitTypes.B
327
331
}
328
- " D" = @ {
332
+ " D" = @ {
329
333
" ExitResult" = " No Installation Sources Available"
330
334
" ExitType" = $SC.ExitTypes.B
331
335
}
332
- " E" = @ {
336
+ " E" = @ {
333
337
" ExitResult" = " Installer File is Missing"
334
338
" ExitType" = $SC.ExitTypes.B
335
339
}
336
- " F" = @ {
340
+ " F" = @ {
337
341
" ExitResult" = " Installer Version Mismatch"
338
342
" ExitType" = $SC.ExitTypes.B
339
343
}
340
- " G" = @ {
344
+ " G" = @ {
341
345
" ExitResult" = (" Unable to Reach " + $NC.Products.NCServer.Name )
342
346
" ExitType" = $SC.ExitTypes.C
343
347
}
344
- " H" = @ {
348
+ " H" = @ {
345
349
" ExitResult" = " Customer ID Parameter Required"
346
350
" ExitType" = $SC.ExitTypes.B
347
351
}
348
- " I" = @ {
352
+ " I" = @ {
349
353
" ExitResult" = " Customer ID Parameter Invalid"
350
354
" ExitType" = $SC.ExitTypes.B
351
355
}
352
- " J" = @ {
356
+ " J" = @ {
353
357
" ExitResult" = " Windows Installer Service Unavailable"
354
358
" ExitType" = $SC.ExitTypes.D
355
359
}
356
- " K" = @ {
360
+ " K" = @ {
357
361
" ExitResult" = " .NET Framework Installation Failed"
358
362
" ExitType" = $SC.ExitTypes.D
359
363
}
360
- " L" = @ {
364
+ " L" = @ {
361
365
" ExitResult" = " Agent Removal Failed"
362
366
" ExitType" = $SC.ExitTypes.D
363
367
}
364
- " M" = @ {
368
+ " M" = @ {
365
369
" ExitResult" = " No Installation Methods Remaining"
366
370
" ExitType" = $SC.ExitTypes.D
367
371
}
368
- " AA" = @ {
372
+ " AA" = @ {
369
373
" ExitMessage" = " An invalid Parameter value or type was provided to a Script Function."
370
374
" ExitResult" = " Invalid Parameter"
371
375
" ExitType" = $SC.ExitTypes.E
372
376
}
373
- " AB" = @ {
377
+ " AB" = @ {
374
378
" ExitMessage" = (" The current " + $NC.Products.Agent.Name + " installation requires repair, but no Repairs were selected to be applied." )
375
379
" ExitResult" = " No Repairs Selected"
376
380
" ExitType" = $SC.ExitTypes.E
377
381
}
378
- " AC" = @ {
382
+ " AC" = @ {
379
383
" ExitMessage" = " An error occurred during a file transfer and the Script cannot proceed."
380
384
" ExitResult" = " File Transfer Failed"
381
385
" ExitType" = $SC.ExitTypes.E
382
386
}
383
- " AD" = @ {
387
+ " AD" = @ {
384
388
" ExitMessage" = " The file at the specified path does not exist."
385
389
" ExitResult" = " File Not Found"
386
390
" ExitType" = $SC.ExitTypes.E
387
391
}
388
- " AE" = @ {
392
+ " AE" = @ {
389
393
" ExitMessage" = " An error occurred during item creation and the Script cannot proceed."
390
394
" ExitResult" = " File/Folder Creation Failed"
391
395
" ExitType" = $SC.ExitTypes.E
392
396
}
393
- " LEGACY " = @ {
397
+ " AF " = @ {
394
398
" ExitMessage" = " The agent could not be installed on this legacy platform."
395
399
" ExitResult" = " Legacy installation unavailable"
396
400
" ExitType" = $SC.ExitTypes.E
@@ -482,7 +486,7 @@ $SC.Names = @{
482
486
}
483
487
# Path Constants
484
488
$SC.Paths = @ {
485
- " ExecutionKey" = " HKLM:\SOFTWARE\Solarwinds MSP Community"
489
+ " ExecutionKey" = " HKLM:\SOFTWARE\N-able Community"
486
490
" ServiceKey" = " HKLM:\SYSTEM\CurrentControlSet\Services"
487
491
" TempFolder" = Split-Path $MyInvocation.MyCommand.Path - Parent
488
492
}
@@ -575,13 +579,14 @@ $SC.Validation = @{
575
579
}
576
580
# ## Retired Values - PLACE RETIRED VALUES HERE TO CLEANUP OLD SCRIPT ENTRIES
577
581
$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"
581
586
}
582
587
583
588
function 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
585
590
}
586
591
587
592
0 commit comments