Logging, PCTypes, edge profiles for all types
Three final optimization batches: 1. Start-Transcript added to 4 scripts that lacked standalone logging: 04-NetworkAndWinRM.ps1, 05-OfficeShortcuts.ps1, 01-eDNC.ps1, 02-MachineNumberACLs.ps1. Each writes to C:\Logs\SFLD\<name>.log with append mode. Stop-Transcript added before exit points. 2. preinstall.json: Oracle Client PCTypes changed from ["*"] to ["Standard", "CMM", "Genspect", "Keyence", "WaxAndTrace", "Display"]. Lab Workstations don't need Oracle Client (shopfloor data app dependency). VC++ redists stay at ["*"] (harmless shared deps). 3. Edge profiles added to all remaining PC types in site-config.json: CMM, Genspect, Keyence, WaxAndTrace, Standard-Timeclock all get the standard 3-tab setup (Plant Apps + Homepage + Dashboard) with homepage = tsgwp00524. Display-Lobby and Display-Dashboard get Shopfloor Dashboard as both homepage and single tab. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,11 @@
|
||||
#
|
||||
# Idempotent: overwrites existing .lnk files each run.
|
||||
|
||||
# --- Transcript ---
|
||||
$logDir = 'C:\Logs\SFLD'
|
||||
if (-not (Test-Path $logDir)) { try { New-Item -ItemType Directory -Path $logDir -Force | Out-Null } catch {} }
|
||||
try { Start-Transcript -Path (Join-Path $logDir '05-OfficeShortcuts.log') -Append -Force | Out-Null } catch {}
|
||||
|
||||
$officeApps = @(
|
||||
@{ Exe = 'EXCEL.EXE'; Name = 'Excel' }
|
||||
@{ Exe = 'WINWORD.EXE'; Name = 'Word' }
|
||||
@@ -53,6 +58,7 @@ if (-not $officeRoot) {
|
||||
$hit = if (Test-Path $p) { "(dir exists)" } else { "(missing)" }
|
||||
Write-Host " $p $hit"
|
||||
}
|
||||
try { Stop-Transcript | Out-Null } catch {}
|
||||
exit 0
|
||||
}
|
||||
|
||||
@@ -91,4 +97,5 @@ foreach ($app in $officeApps) {
|
||||
|
||||
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($shell) | Out-Null
|
||||
Write-Host "Office shortcuts created."
|
||||
try { Stop-Transcript | Out-Null } catch {}
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user