feat(gameboot-windows): add support for installers.json and Install-Games.ps1 deployment
Extend the file deployment loop to include installers.json and Install-Games.ps1 files. Add conditional path validation before copying to gracefully handle missing files instead of failing on non-existent paths.
This commit is contained in:
+3
-2
@@ -44,8 +44,9 @@ if ($pwdRequired -and -not $PSBoundParameters.ContainsKey('Password')) {
|
|||||||
# --- Deploiement des scripts + durcissement ACL (exe potentiellement lance ELEVE) ---
|
# --- Deploiement des scripts + durcissement ACL (exe potentiellement lance ELEVE) ---
|
||||||
$dest = Join-Path $Env:ProgramData 'FWS'
|
$dest = Join-Path $Env:ProgramData 'FWS'
|
||||||
New-Item -ItemType Directory -Force -Path $dest | Out-Null
|
New-Item -ItemType Directory -Force -Path $dest | Out-Null
|
||||||
foreach ($f in 'fws-return.ps1','fws-play.ps1','games.json') {
|
foreach ($f in 'fws-return.ps1','fws-play.ps1','games.json','installers.json','Install-Games.ps1') {
|
||||||
Copy-Item (Join-Path $PSScriptRoot $f) $dest -Force
|
$src = Join-Path $PSScriptRoot $f
|
||||||
|
if (Test-Path $src) { Copy-Item $src $dest -Force }
|
||||||
}
|
}
|
||||||
# SYSTEM + Administrateurs = plein controle ; Utilisateurs = lecture seule ; heritage retire.
|
# SYSTEM + Administrateurs = plein controle ; Utilisateurs = lecture seule ; heritage retire.
|
||||||
& icacls $dest /inheritance:r /grant:r 'SYSTEM:(OI)(CI)F' '*S-1-5-32-544:(OI)(CI)F' '*S-1-5-32-545:(OI)(CI)RX' | Out-Null
|
& icacls $dest /inheritance:r /grant:r 'SYSTEM:(OI)(CI)F' '*S-1-5-32-544:(OI)(CI)F' '*S-1-5-32-545:(OI)(CI)RX' | Out-Null
|
||||||
|
|||||||
Reference in New Issue
Block a user