01-eDNC.ps1: match both eDNC-*.msi and eDNC_*.msi naming styles
Vendor stamps the 6.4.5 MSI as eDNC_6-4-5.msi (underscore + hyphens) but prior versions shipped as eDNC-6.4.3.msi (dash). The previous filter only matched the dash form so the imaging-time install would skip 6.4.5 outright. Filter is now eDNC*.msi which catches both. Imaging dir is expected to hold exactly one version at a time; rollback to a prior version is handled post-imaging via the SFLD share's standard-machine/apps/ alternates, not by keeping multiple MSIs in the imaging path. Also updated the Write-Warning fallback to mention the new filter pattern. PXE server's /srv/samba/enrollment/shopfloor-setup/Standard/eDNC/ has been swapped 6.4.3 -> 6.4.5 alongside this commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,11 @@ if (-not (Test-Path $edncDir)) {
|
||||
}
|
||||
|
||||
# --- Find installer ---
|
||||
$edncMsi = Get-ChildItem -Path $edncDir -Filter "eDNC-*.msi" | Select-Object -First 1
|
||||
# Filter is eDNC*.msi (no dash) so we match both vendor naming styles:
|
||||
# eDNC-6.4.3.msi (dash) and eDNC_6-4-5.msi (underscore). Imaging dir should
|
||||
# only contain ONE version at a time; rollback to a prior version is handled
|
||||
# post-imaging via the SFLD share's standard-machine/apps/ alternates.
|
||||
$edncMsi = Get-ChildItem -Path $edncDir -Filter "eDNC*.msi" | Select-Object -First 1
|
||||
$emxInfo = Join-Path $edncDir "eMxInfo.txt"
|
||||
|
||||
# --- 1. Install eDNC ---
|
||||
@@ -54,7 +58,7 @@ if ($edncMsi) {
|
||||
$p = Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"$($edncMsi.FullName)`" /qn /norestart LAUNCHNTLARS=false SITESELECTED=`"$siteName`"" -Wait -PassThru
|
||||
Write-Host " eDNC exit code: $($p.ExitCode)"
|
||||
} else {
|
||||
Write-Warning "eDNC installer not found in $edncDir (expected eDNC-*.msi)"
|
||||
Write-Warning "eDNC installer not found in $edncDir (expected eDNC*.msi)"
|
||||
}
|
||||
|
||||
# --- 2. Mirror x86 install to 64-bit Program Files (app uses hardcoded paths) ---
|
||||
|
||||
Reference in New Issue
Block a user