09-Setup-WaxAndTrace: bypass vendor cal Setup.exe for all 218-378-13 probes
The .NET cal Setup.exe crashes (0xE0434352) on 218-378-13 series ISOs even when filenames are clean (no trailing-space bug). Previously only bypassed when the ' _' trailing-space signature was detected. Now detects by probe series ID in the data filenames too and always does direct file copy for 218-378-13. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -261,21 +261,21 @@ if (-not $asset) {
|
|||||||
$srcDataDir = Join-Path $calRoot 'data'
|
$srcDataDir = Join-Path $calRoot 'data'
|
||||||
$dstDataDir = 'C:\Program Files (x86)\MitutoyoApp\Formtracepak\data'
|
$dstDataDir = 'C:\Program Files (x86)\MitutoyoApp\Formtracepak\data'
|
||||||
|
|
||||||
$hasBrokenFilenames = $false
|
$bypassVendorSetup = $false
|
||||||
if (Test-Path -LiteralPath $srcDataDir) {
|
if (Test-Path -LiteralPath $srcDataDir) {
|
||||||
# Get-ChildItem -Filter uses Win32 filtering and does NOT
|
# The 218-378-13 probe series has a buggy .NET Setup.exe
|
||||||
# honor PowerShell wildcards / character classes - '[0-9]'
|
# that crashes (0xE0434352) even when filenames are clean.
|
||||||
# would match literal bracketed text. Use -Include +
|
# Older ISOs had trailing-space filenames (' _' pattern);
|
||||||
# Where-Object regex instead. The bug signature is
|
# newer ISOs fixed the filenames but the .NET wrapper
|
||||||
# ' _' (space-underscore) inside the filename, e.g.
|
# still crashes on some path operation. Detect by probe
|
||||||
# 'Linear_X_218-378-13 _100072210.txt'.
|
# series in filename OR the trailing-space signature.
|
||||||
$hasBrokenFilenames = [bool](Get-ChildItem -LiteralPath $srcDataDir -File -ErrorAction SilentlyContinue |
|
$bypassVendorSetup = [bool](Get-ChildItem -LiteralPath $srcDataDir -File -ErrorAction SilentlyContinue |
|
||||||
Where-Object { $_.Name -match ' _\d+\.txt$' } |
|
Where-Object { $_.Name -match '218-378-13' -or $_.Name -match ' _\d+\.txt$' } |
|
||||||
Select-Object -First 1)
|
Select-Object -First 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($hasBrokenFilenames) {
|
if ($bypassVendorSetup) {
|
||||||
Write-WTLog " disc has trailing-space probe-ID filenames (218-378-13 series) - bypassing buggy vendor Setup.exe, doing direct copy"
|
Write-WTLog " 218-378-13 series detected - bypassing vendor Setup.exe, doing direct file copy"
|
||||||
if (-not (Test-Path -LiteralPath $dstDataDir)) {
|
if (-not (Test-Path -LiteralPath $dstDataDir)) {
|
||||||
Write-WTLog " destination data dir does not exist: $dstDataDir" 'ERROR'
|
Write-WTLog " destination data dir does not exist: $dstDataDir" 'ERROR'
|
||||||
Write-WTLog " (FormTracePak install may not be complete; cal apply aborted)" 'ERROR'
|
Write-WTLog " (FormTracePak install may not be complete; cal apply aborted)" 'ERROR'
|
||||||
|
|||||||
Reference in New Issue
Block a user