Add maintenance toolkit, DNC/OnGuard utilities
- Add Invoke-RemoteMaintenance.ps1: Remote maintenance tasks (DISM, SFC, disk cleanup, etc.) - Add DNC/, dncfix/, edncfix/: DNC configuration utilities - Add onguard/: OnGuard integration scripts - Add tools/: Additional utility scripts - Update remote-execution/README.md with maintenance toolkit docs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
93
onguard/silentInstall.ps1
Normal file
93
onguard/silentInstall.ps1
Normal file
@@ -0,0 +1,93 @@
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
param(
|
||||
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string]
|
||||
$LicenseServer,
|
||||
|
||||
[Parameter(Mandatory=$True)]
|
||||
[string]
|
||||
$DatabaseServer
|
||||
|
||||
)
|
||||
|
||||
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
|
||||
|
||||
# Only Client installations are supported at this time
|
||||
# $Features can optionally be assigned to an array of specific Client Features from within available features
|
||||
# The available client features are: AlarmMonitoring AreaAccessManager BadgeDesigner DeviceDicoveryService DeviceDiscovery FormsDesigner IDCredentialCenter MapDesigner SystemAdministration VideoViewer VisitorManagement
|
||||
# example: $Features = @("AlarmMonitoring","IDCredentialCenter","SystemAdministration")
|
||||
|
||||
$Features = "Client"
|
||||
|
||||
$availableFeatures = @("AlarmMonitoring","AreaAccessManager","BadgeDesigner","DeviceDicoveryService","DeviceDiscovery","FormsDesigner","IDCredentialCenter","MapDesigner","SystemAdministration","VideoViewer","VisitorManagement","ApplicationServer","ClientUpdateServer","CommunicationServer","DataConduITService","DataExchangeServer","EnterpriseAdministration","GlobalOutputServer","IDAllocationService","Import","LicenseSystemServer","LoginDriver","OpenAccess","Replicator","ReportsDashboard","SetupDB","UniversalTimeConversionUtility","VideoArchiveServer")
|
||||
|
||||
# Formats the feature list parameter based on the installation type or features passed in
|
||||
if ( "Client" -in $Features ) {
|
||||
Write-Host "Installing client features silently."
|
||||
$featureParam = "ADDLOCAL=""AlarmMonitoring,AreaAccessManager,BadgeDesigner,DeviceDicoveryService,DeviceDiscovery,FormsDesigner,IDCredentialCenter,MapDesigner,SystemAdministration,VideoViewer,VisitorManagement"" REMOVE=""ApplicationServer,ClientUpdateServer,CommunicationServer,DataConduITService,DataExchangeServer,EnterpriseAdministration,GlobalOutputServer,IDAllocationService,Import,LicenseSystemServer,LoginDriver,OpenAccess,Replicator,ReportsDashboard,SetupDB,UniversalTimeConversionUtility,VideoArchiveServer"""
|
||||
Write-Host $featureParam
|
||||
}
|
||||
elseif ( -not @($Features | where {$availableFeatures -notcontains $_}).Count ) {
|
||||
# Ensures any arguments are in the available features
|
||||
# Features can optionabe an array of available Client Features Only
|
||||
Write-Host "Installing a custom set of features."
|
||||
$removeFeatures = @()
|
||||
foreach ($feature in $availableFeatures) {
|
||||
if ($args -notcontains $feature) {
|
||||
$removeFeatures += $feature
|
||||
}
|
||||
}
|
||||
$featureParam = "ADDLOCAL=""$($args -join ",")"" REMOVE=""$($removeFeatures -join ",")"""
|
||||
}
|
||||
else {
|
||||
Throw "An error was encountered with the arguments"
|
||||
}
|
||||
|
||||
if ( test-path 'HKLM:\SOFTWARE\WOW6432Node\Lenel\OnGuard') {
|
||||
$productCode = Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Lenel\OnGuard -Name "ProductCode"
|
||||
$systemtypedetect="PREV101102=""102"""
|
||||
}
|
||||
else {
|
||||
$systemtypedetect="SYSTEMTYPE=""C"""
|
||||
}
|
||||
|
||||
# When an existing instance is installed: backup the registry, remove the product, restore the registry values for the reinstall to pickup
|
||||
If ( $productCode ) {
|
||||
Md Registry::HKLM\SOFTWARE\WOW6432Node\LenelBackup -Force
|
||||
Copy-Item -Path Registry::HKLM\SOFTWARE\WOW6432Node\Lenel\OnGuard -Destination Registry::HKLM\SOFTWARE\WOW6432Node\LenelBackup -Recurse
|
||||
$Og_productCode=$productCode.ProductCode.ToString()
|
||||
cmd /c msiexec.exe /x $Og_productCode /qn
|
||||
Write-Host $productCode.ProductCode
|
||||
Copy-Item -Path Registry::HKLM\SOFTWARE\WOW6432Node\LenelBackup\OnGuard -Destination Registry::HKLM\SOFTWARE\WOW6432Node\Lenel -Recurse
|
||||
}
|
||||
|
||||
$currentpath = (Get-Item -Path ".\").FullName
|
||||
|
||||
# Install Microsoft Direct X for Managed Code
|
||||
Write-Host "Installing Direct X for Managed Code..."
|
||||
cmd /c msiexec.exe /i "$($currentpath)\Windows\Temp\DXManaged\mdxredist.msi" /qn
|
||||
|
||||
# Install Acuant Capture/Scanning SDK
|
||||
Write-Host "Install Acuant Capture/Scanning SDK..."
|
||||
cmd /c "$($currentpath)\Windows\Temp\CSSN_SDK\sdk_setup_is.exe" /s /a /s /f1 "$($currentpath)\Windows\Temp\CSSN_SDK\setup.iss"
|
||||
|
||||
# Install Crystal Reports Runtime
|
||||
Write-Host "Installing Crystal Reports Runtime"
|
||||
cmd /c msiexec.exe /i "$($currentpath)\Windows\Temp\Crystal\CRRuntime_32bit_13_0_32.msi" /qn UPGRADE=1
|
||||
|
||||
# Install Microsoft Windows Media Encoder
|
||||
Write-Host "Installing Microsoft Windows Media Encoder"
|
||||
cmd /c msiexec.exe /i "$($currentpath)\Windows\Temp\WMEncoder\WMEncoder.msi" /qn
|
||||
|
||||
# Install UltrView SDK
|
||||
Write-Host "Installing UltrView SDK"
|
||||
cmd /c "$($currentpath)\Windows\Temp\UltraView\UltraViewSoftwareDevelopmentKit.exe" -silent
|
||||
|
||||
# Setting environmental variables
|
||||
cmd /c setx /M PATH "%PATH%;C:\Program Files (x86)\Common Files\Lenel;C:\Program Files (x86)\Acuant\SDK" | Out-Null
|
||||
|
||||
# Install OnGuard
|
||||
Write-Host "Installing OnGuard"
|
||||
cmd /c "$($currentpath)\setup.exe" /s /v"/qn /L*V "$($env:LOCALAPPDATA)\OnGuardSetup.log" $systemtypedetect LICENSESERVER=$LicenseServer DSN=$DatabaseServer DATABASETYPE="SQL" REBOOT=Suppress $featureParam"
|
||||
Reference in New Issue
Block a user