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:
@@ -11,7 +11,7 @@
|
|||||||
"DetectionPath": "HKLM:\\SOFTWARE\\WOW6432Node\\ORACLE\\KEY_OraClientInfra10_2_0",
|
"DetectionPath": "HKLM:\\SOFTWARE\\WOW6432Node\\ORACLE\\KEY_OraClientInfra10_2_0",
|
||||||
"DetectionName": "ORACLE_HOME_NAME",
|
"DetectionName": "ORACLE_HOME_NAME",
|
||||||
"DetectionValue": "OraClientInfra10_2_0",
|
"DetectionValue": "OraClientInfra10_2_0",
|
||||||
"PCTypes": ["*"]
|
"PCTypes": ["Standard", "CMM", "Genspect", "Keyence", "WaxAndTrace", "Display"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"_comment": "VC++ 2008 SP1 x86 - the bootstrapper (vcredist2008_x86.exe) ignores /norestart and triggers an immediate Windows reboot when files are in use (per Aaron Stebner's MSDN docs). Fix: install the extracted vc_red.msi directly with REBOOT=ReallySuppress, which IS hard-honored by Windows Installer. msiexec may return 3010 (would-have-rebooted-but-suppressed) but won't actually reboot. cab name 'vc_red.cab' is hardcoded in the MSI's Media table - do not rename.",
|
"_comment": "VC++ 2008 SP1 x86 - the bootstrapper (vcredist2008_x86.exe) ignores /norestart and triggers an immediate Windows reboot when files are in use (per Aaron Stebner's MSDN docs). Fix: install the extracted vc_red.msi directly with REBOOT=ReallySuppress, which IS hard-honored by Windows Installer. msiexec may return 3010 (would-have-rebooted-but-suppressed) but won't actually reboot. cab name 'vc_red.cab' is hardcoded in the MSI's Media table - do not rename.",
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
# 04-NetworkAndWinRM.ps1 — Set network profiles to Private and enable WinRM (baseline)
|
# 04-NetworkAndWinRM.ps1 — Set network profiles to Private and enable WinRM (baseline)
|
||||||
|
|
||||||
|
# --- 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 '04-NetworkAndWinRM.log') -Append -Force | Out-Null } catch {}
|
||||||
|
|
||||||
# --- Set all network profiles to Private ---
|
# --- Set all network profiles to Private ---
|
||||||
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
|
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
|
||||||
Write-Host "All network profiles set to Private."
|
Write-Host "All network profiles set to Private."
|
||||||
@@ -7,3 +12,4 @@ Write-Host "All network profiles set to Private."
|
|||||||
# --- Enable and configure WinRM ---
|
# --- Enable and configure WinRM ---
|
||||||
Enable-PSRemoting -Force -SkipNetworkProfileCheck
|
Enable-PSRemoting -Force -SkipNetworkProfileCheck
|
||||||
Write-Host "WinRM enabled."
|
Write-Host "WinRM enabled."
|
||||||
|
try { Stop-Transcript | Out-Null } catch {}
|
||||||
|
|||||||
@@ -15,6 +15,11 @@
|
|||||||
#
|
#
|
||||||
# Idempotent: overwrites existing .lnk files each run.
|
# 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 = @(
|
$officeApps = @(
|
||||||
@{ Exe = 'EXCEL.EXE'; Name = 'Excel' }
|
@{ Exe = 'EXCEL.EXE'; Name = 'Excel' }
|
||||||
@{ Exe = 'WINWORD.EXE'; Name = 'Word' }
|
@{ Exe = 'WINWORD.EXE'; Name = 'Word' }
|
||||||
@@ -53,6 +58,7 @@ if (-not $officeRoot) {
|
|||||||
$hit = if (Test-Path $p) { "(dir exists)" } else { "(missing)" }
|
$hit = if (Test-Path $p) { "(dir exists)" } else { "(missing)" }
|
||||||
Write-Host " $p $hit"
|
Write-Host " $p $hit"
|
||||||
}
|
}
|
||||||
|
try { Stop-Transcript | Out-Null } catch {}
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,4 +97,5 @@ foreach ($app in $officeApps) {
|
|||||||
|
|
||||||
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($shell) | Out-Null
|
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($shell) | Out-Null
|
||||||
Write-Host "Office shortcuts created."
|
Write-Host "Office shortcuts created."
|
||||||
|
try { Stop-Transcript | Out-Null } catch {}
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
# 01-eDNC.ps1 - Install eDNC and deploy custom eMxInfo.txt (Standard)
|
# 01-eDNC.ps1 - Install eDNC and deploy custom eMxInfo.txt (Standard)
|
||||||
|
|
||||||
|
# --- 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 '01-eDNC.log') -Append -Force | Out-Null } catch {}
|
||||||
|
|
||||||
Write-Host "=== eDNC Setup ==="
|
Write-Host "=== eDNC Setup ==="
|
||||||
|
|
||||||
function Get-SiteConfig {
|
function Get-SiteConfig {
|
||||||
@@ -24,6 +29,7 @@ $edncDir = "C:\Enrollment\shopfloor-setup\Standard\eDNC"
|
|||||||
|
|
||||||
if (-not (Test-Path $edncDir)) {
|
if (-not (Test-Path $edncDir)) {
|
||||||
Write-Warning "eDNC folder not found at $edncDir - skipping."
|
Write-Warning "eDNC folder not found at $edncDir - skipping."
|
||||||
|
try { Stop-Transcript | Out-Null } catch {}
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,3 +83,4 @@ if (Test-Path $emxInfo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "=== eDNC Setup Complete ==="
|
Write-Host "=== eDNC Setup Complete ==="
|
||||||
|
try { Stop-Transcript | Out-Null } catch {}
|
||||||
|
|||||||
@@ -11,6 +11,11 @@
|
|||||||
# - HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC\General
|
# - HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC\General
|
||||||
# -> BUILTIN\Users : SetValue
|
# -> BUILTIN\Users : SetValue
|
||||||
|
|
||||||
|
# --- 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 '02-MachineNumberACLs.log') -Append -Force | Out-Null } catch {}
|
||||||
|
|
||||||
Write-Host "02-MachineNumberACLs.ps1 starting $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
|
Write-Host "02-MachineNumberACLs.ps1 starting $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
|
||||||
Write-Host "Running as: $([System.Security.Principal.WindowsIdentity]::GetCurrent().Name)"
|
Write-Host "Running as: $([System.Security.Principal.WindowsIdentity]::GetCurrent().Name)"
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
@@ -62,3 +67,4 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "ACL setup complete."
|
Write-Host "ACL setup complete."
|
||||||
|
try { Stop-Transcript | Out-Null } catch {}
|
||||||
|
|||||||
@@ -63,6 +63,12 @@
|
|||||||
"desktopApps": [
|
"desktopApps": [
|
||||||
{ "name": "WJ Shopfloor", "kind": "existing", "sourceName": "WJ Shopfloor.lnk" },
|
{ "name": "WJ Shopfloor", "kind": "existing", "sourceName": "WJ Shopfloor.lnk" },
|
||||||
{ "name": "Defect_Tracker", "kind": "existing", "sourceName": "Defect_Tracker.lnk" }
|
{ "name": "Defect_Tracker", "kind": "existing", "sourceName": "Defect_Tracker.lnk" }
|
||||||
|
],
|
||||||
|
"edgeHomepage": "http://tsgwp00524.logon.ds.ge.com/",
|
||||||
|
"edgeStartupTabs": [
|
||||||
|
{ "baseName": "Plant Apps", "fallbackUrlKey": "plantApps" },
|
||||||
|
{ "baseName": "WJ Shop Floor Homepage", "fallbackUrlKey": "shopFloorHomepage" },
|
||||||
|
{ "baseName": "Shopfloor Dashboard", "fallbackUrlKey": "shopfloorDashboard" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -102,6 +108,12 @@
|
|||||||
],
|
],
|
||||||
"desktopApps": [
|
"desktopApps": [
|
||||||
{ "name": "WJ Shopfloor", "kind": "existing", "sourceName": "WJ Shopfloor.lnk" }
|
{ "name": "WJ Shopfloor", "kind": "existing", "sourceName": "WJ Shopfloor.lnk" }
|
||||||
|
],
|
||||||
|
"edgeHomepage": "http://tsgwp00524.logon.ds.ge.com/",
|
||||||
|
"edgeStartupTabs": [
|
||||||
|
{ "baseName": "Plant Apps", "fallbackUrlKey": "plantApps" },
|
||||||
|
{ "baseName": "WJ Shop Floor Homepage", "fallbackUrlKey": "shopFloorHomepage" },
|
||||||
|
{ "baseName": "Shopfloor Dashboard", "fallbackUrlKey": "shopfloorDashboard" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -116,6 +128,12 @@
|
|||||||
],
|
],
|
||||||
"desktopApps": [
|
"desktopApps": [
|
||||||
{ "name": "WJ Shopfloor", "kind": "existing", "sourceName": "WJ Shopfloor.lnk" }
|
{ "name": "WJ Shopfloor", "kind": "existing", "sourceName": "WJ Shopfloor.lnk" }
|
||||||
|
],
|
||||||
|
"edgeHomepage": "http://tsgwp00524.logon.ds.ge.com/",
|
||||||
|
"edgeStartupTabs": [
|
||||||
|
{ "baseName": "Plant Apps", "fallbackUrlKey": "plantApps" },
|
||||||
|
{ "baseName": "WJ Shop Floor Homepage", "fallbackUrlKey": "shopFloorHomepage" },
|
||||||
|
{ "baseName": "Shopfloor Dashboard", "fallbackUrlKey": "shopfloorDashboard" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -130,6 +148,12 @@
|
|||||||
],
|
],
|
||||||
"desktopApps": [
|
"desktopApps": [
|
||||||
{ "name": "WJ Shopfloor", "kind": "existing", "sourceName": "WJ Shopfloor.lnk" }
|
{ "name": "WJ Shopfloor", "kind": "existing", "sourceName": "WJ Shopfloor.lnk" }
|
||||||
|
],
|
||||||
|
"edgeHomepage": "http://tsgwp00524.logon.ds.ge.com/",
|
||||||
|
"edgeStartupTabs": [
|
||||||
|
{ "baseName": "Plant Apps", "fallbackUrlKey": "plantApps" },
|
||||||
|
{ "baseName": "WJ Shop Floor Homepage", "fallbackUrlKey": "shopFloorHomepage" },
|
||||||
|
{ "baseName": "Shopfloor Dashboard", "fallbackUrlKey": "shopfloorDashboard" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -144,6 +168,12 @@
|
|||||||
],
|
],
|
||||||
"desktopApps": [
|
"desktopApps": [
|
||||||
{ "name": "WJ Shopfloor", "kind": "existing", "sourceName": "WJ Shopfloor.lnk" }
|
{ "name": "WJ Shopfloor", "kind": "existing", "sourceName": "WJ Shopfloor.lnk" }
|
||||||
|
],
|
||||||
|
"edgeHomepage": "http://tsgwp00524.logon.ds.ge.com/",
|
||||||
|
"edgeStartupTabs": [
|
||||||
|
{ "baseName": "Plant Apps", "fallbackUrlKey": "plantApps" },
|
||||||
|
{ "baseName": "WJ Shop Floor Homepage", "fallbackUrlKey": "shopFloorHomepage" },
|
||||||
|
{ "baseName": "Shopfloor Dashboard", "fallbackUrlKey": "shopfloorDashboard" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -168,7 +198,11 @@
|
|||||||
"taskbarPins": [
|
"taskbarPins": [
|
||||||
{ "name": "Microsoft Edge", "lnkPath": "%ALLUSERSPROFILE%\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Edge.lnk" }
|
{ "name": "Microsoft Edge", "lnkPath": "%ALLUSERSPROFILE%\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Edge.lnk" }
|
||||||
],
|
],
|
||||||
"desktopApps": []
|
"desktopApps": [],
|
||||||
|
"edgeHomepage": "https://tsgwp00525.wjs.geaerospace.net/shopdb/shopfloor-dashboard/",
|
||||||
|
"edgeStartupTabs": [
|
||||||
|
{ "baseName": "Shopfloor Dashboard", "fallbackUrlKey": "shopfloorDashboard" }
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"Display-Dashboard": {
|
"Display-Dashboard": {
|
||||||
@@ -177,7 +211,11 @@
|
|||||||
"taskbarPins": [
|
"taskbarPins": [
|
||||||
{ "name": "Microsoft Edge", "lnkPath": "%ALLUSERSPROFILE%\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Edge.lnk" }
|
{ "name": "Microsoft Edge", "lnkPath": "%ALLUSERSPROFILE%\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Edge.lnk" }
|
||||||
],
|
],
|
||||||
"desktopApps": []
|
"desktopApps": [],
|
||||||
|
"edgeHomepage": "https://tsgwp00525.wjs.geaerospace.net/shopdb/shopfloor-dashboard/",
|
||||||
|
"edgeStartupTabs": [
|
||||||
|
{ "baseName": "Shopfloor Dashboard", "fallbackUrlKey": "shopfloorDashboard" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user