Separate lock screen and desktop wallpaper bases
This commit is contained in:
@@ -38,6 +38,7 @@ $interactiveLogonPolicyPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\P
|
||||
$accountPictureSourcePath = Join-Path $PublishPath 'branding\user.png'
|
||||
$accountPictureDirectory = Join-Path $env:ProgramData 'Microsoft\User Account Pictures'
|
||||
$welcomeWallpaperSourcePath = Join-Path $PublishPath 'branding\darkblue.jpg'
|
||||
$welcomeLockScreenSourcePath = Join-Path $PublishPath 'branding\darkblue-lockscreen.jpg'
|
||||
$welcomeWallpaperScriptSourcePath = Join-Path $PublishPath 'branding\Set-SguWelcomeWallpaper.ps1'
|
||||
$welcomeFontsSourcePath = Join-Path $PublishPath 'branding\fonts'
|
||||
$welcomeWallpaperDirectory = Join-Path $env:ProgramData 'SGU\Branding'
|
||||
@@ -128,6 +129,7 @@ function Install-DefaultAccountPicture {
|
||||
|
||||
function Install-WelcomeWallpaperAssets {
|
||||
if (-not (Test-Path -LiteralPath $welcomeWallpaperSourcePath -PathType Leaf) -or
|
||||
-not (Test-Path -LiteralPath $welcomeLockScreenSourcePath -PathType Leaf) -or
|
||||
-not (Test-Path -LiteralPath $welcomeWallpaperScriptSourcePath -PathType Leaf)) {
|
||||
return $false
|
||||
}
|
||||
@@ -135,6 +137,8 @@ function Install-WelcomeWallpaperAssets {
|
||||
New-Item -ItemType Directory -Path $welcomeWallpaperDirectory -Force | Out-Null
|
||||
Copy-Item -LiteralPath $welcomeWallpaperSourcePath `
|
||||
-Destination (Join-Path $welcomeWallpaperDirectory 'darkblue.jpg') -Force
|
||||
Copy-Item -LiteralPath $welcomeLockScreenSourcePath `
|
||||
-Destination (Join-Path $welcomeWallpaperDirectory 'darkblue-lockscreen.jpg') -Force
|
||||
Copy-Item -LiteralPath $welcomeWallpaperScriptSourcePath `
|
||||
-Destination (Join-Path $welcomeWallpaperDirectory 'Set-SguWelcomeWallpaper.ps1') -Force
|
||||
if (Test-Path -LiteralPath $welcomeFontsSourcePath -PathType Container) {
|
||||
@@ -358,5 +362,6 @@ catch {
|
||||
SystemPasswordProviderPreserved = $true
|
||||
WelcomeWallpaperAssetsInstalled =
|
||||
(Test-Path -LiteralPath (Join-Path $welcomeWallpaperDirectory 'darkblue.jpg') -PathType Leaf) -and
|
||||
(Test-Path -LiteralPath (Join-Path $welcomeWallpaperDirectory 'darkblue-lockscreen.jpg') -PathType Leaf) -and
|
||||
(Test-Path -LiteralPath (Join-Path $welcomeWallpaperDirectory 'Set-SguWelcomeWallpaper.ps1') -PathType Leaf)
|
||||
}
|
||||
|
||||
@@ -143,6 +143,8 @@ Copy-RequiredFile -Source (Join-Path $repositoryRoot 'assets\branding\lasalle-ma
|
||||
-Destination (Join-Path $clientRoot 'payload\credential-provider\branding\user.png')
|
||||
Copy-RequiredFile -Source (Join-Path $repositoryRoot 'assets\branding\darkblue.jpg') `
|
||||
-Destination (Join-Path $clientRoot 'payload\credential-provider\branding\darkblue.jpg')
|
||||
Copy-RequiredFile -Source (Join-Path $repositoryRoot 'assets\branding\darkblue-lockscreen.jpg') `
|
||||
-Destination (Join-Path $clientRoot 'payload\credential-provider\branding\darkblue-lockscreen.jpg')
|
||||
Copy-RequiredFile -Source (Join-Path $PSScriptRoot 'Set-SguWelcomeWallpaper.ps1') `
|
||||
-Destination (Join-Path $clientRoot 'payload\credential-provider\branding\Set-SguWelcomeWallpaper.ps1')
|
||||
foreach ($fontName in $welcomeFontNames) {
|
||||
@@ -238,6 +240,8 @@ Copy-RequiredFile -Source (Join-Path $PSScriptRoot 'Set-SguWelcomeWallpaper.ps1'
|
||||
-Destination (Join-Path $serverContentTarget 'welcome-wallpaper\Set-SguWelcomeWallpaper.ps1')
|
||||
Copy-RequiredFile -Source (Join-Path $repositoryRoot 'assets\branding\darkblue.jpg') `
|
||||
-Destination (Join-Path $serverContentTarget 'welcome-wallpaper\darkblue.jpg')
|
||||
Copy-RequiredFile -Source (Join-Path $repositoryRoot 'assets\branding\darkblue-lockscreen.jpg') `
|
||||
-Destination (Join-Path $serverContentTarget 'welcome-wallpaper\darkblue-lockscreen.jpg')
|
||||
foreach ($fontName in $welcomeFontNames) {
|
||||
Copy-RequiredFile -Source (Join-Path $repositoryRoot "assets\branding\fonts\$fontName") `
|
||||
-Destination (Join-Path $serverContentTarget "welcome-wallpaper\fonts\$fontName")
|
||||
|
||||
@@ -5,7 +5,8 @@ param(
|
||||
[string]$DomainController = $env:COMPUTERNAME,
|
||||
[string]$EventCollectorFqdn,
|
||||
[string]$WelcomeWallpaperScriptPath = 'C:\ProgramData\SGU\Branding\Set-SguWelcomeWallpaper.ps1',
|
||||
[string]$WelcomeWallpaperBasePath = 'C:\ProgramData\SGU\Branding\darkblue.jpg'
|
||||
[string]$WelcomeWallpaperBasePath = 'C:\ProgramData\SGU\Branding\darkblue.jpg',
|
||||
[string]$WelcomeLockScreenBasePath = 'C:\ProgramData\SGU\Branding\darkblue-lockscreen.jpg'
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
@@ -113,14 +114,14 @@ $policies = @(
|
||||
# The machine GPO remains the authority for every interactive session. The
|
||||
# local payload lets the first desktop render without depending on SMB.
|
||||
@{ Key = $runPolicyKey; Name = 'SGUWelcomeWallpaper'; Type = 'String'; Value = $welcomeWallpaperCommand },
|
||||
@{ Key = $personalizationPolicyKey; Name = 'LockScreenImage'; Type = 'String'; Value = $WelcomeWallpaperBasePath },
|
||||
@{ Key = $personalizationPolicyKey; Name = 'LockScreenImage'; Type = 'String'; Value = $WelcomeLockScreenBasePath },
|
||||
@{ Key = $personalizationPolicyKey; Name = 'NoChangingLockScreen'; Type = 'DWord'; Value = 1 },
|
||||
|
||||
# Windows 11 Pro can ignore the legacy lock-screen policy even though it is
|
||||
# present in the registry. PersonalizationCSP provides the same local image
|
||||
# to Pro while remaining harmless on Enterprise and LTSC editions.
|
||||
@{ Key = $personalizationCspKey; Name = 'LockScreenImagePath'; Type = 'String'; Value = $WelcomeWallpaperBasePath },
|
||||
@{ Key = $personalizationCspKey; Name = 'LockScreenImageUrl'; Type = 'String'; Value = $WelcomeWallpaperBasePath },
|
||||
@{ Key = $personalizationCspKey; Name = 'LockScreenImagePath'; Type = 'String'; Value = $WelcomeLockScreenBasePath },
|
||||
@{ Key = $personalizationCspKey; Name = 'LockScreenImageUrl'; Type = 'String'; Value = $WelcomeLockScreenBasePath },
|
||||
@{ Key = $personalizationCspKey; Name = 'LockScreenImageStatus'; Type = 'DWord'; Value = 1 },
|
||||
@{ Key = $cloudContentPolicyKey; Name = 'DisableWindowsSpotlightFeatures'; Type = 'DWord'; Value = 1 },
|
||||
@{ Key = $cloudContentPolicyKey; Name = 'DisableWindowsSpotlightOnLockScreen'; Type = 'DWord'; Value = 1 }
|
||||
@@ -176,6 +177,6 @@ $linkEnabled = $link -and (
|
||||
PolicyCount = $configuredPolicies.Count
|
||||
EventCollector = $EventCollectorFqdn
|
||||
WelcomeWallpaperCommand = $welcomeWallpaperCommand
|
||||
LockScreenImage = $WelcomeWallpaperBasePath
|
||||
LockScreenImage = $WelcomeLockScreenBasePath
|
||||
Policies = [pscustomobject]$configuredPolicies
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user