Windows 10 1803 Change Lock Screen and Wallpapers in OOBE

Discussion in 'Windows 10' started by Chibi ANUBIS, Sep 6, 2018.

  1. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    753
    423
    30
    #1 Chibi ANUBIS, Sep 6, 2018
    Last edited: Sep 7, 2018
    Hello MDL ! :)
    For my Workplace, Windows 10 need to have a lock screen and wallpaper of the Company, here a example for work for the last Windows 10 in OOBE.cmd :

    Old Script, before 1703
    Code:
    @ECHO OFF
    SET NameScript=OOBE by Chibi ANUBIS
    title %NameScript%
    color F0
    echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    echo ::                                 %NameScript% 19/10/2016                               ::
    echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    takeown /f %SystemRoot%\WEB\wallpaper\Windows\img0.jpg
    takeown /f %SystemRoot%\Web\4K\Wallpaper\Windows\*.*
    takeown /f %SystemRoot%\WEB\Screen\*.*
    icacls %SystemRoot%\WEB\wallpaper\Windows\img0.jpg /Grant System:(F)
    icacls %SystemRoot%\Web\4K\Wallpaper\Windows\*.* /Grant System:(F)
    icacls %SystemRoot%\WEB\Screen\*.* /Grant System:(F)
    del %SystemRoot%\WEB\wallpaper\Windows\img0.jpg
    del /q %SystemRoot%\Web\4K\Wallpaper\Windows\*.*
    del /q %SystemRoot%\WEB\Screen\*.*
    copy %~dp0img0.jpg %SystemRoot%\WEB\wallpaper\Windows\img0.jpg
    copy %~dp04k\*.* %SystemRoot%\Web\4K\Wallpaper\Windows
    copy %~dp0img100.jpg %SystemRoot%\WEB\Screen\img100.jpg
    RMDIR /S /Q "%WINDIR%\Setup\Scripts"
    exit
    
    New Script
    Code:
    @ECHO OFF
    SET NameScript=OOBE by Chibi ANUBIS
    SET PicToAdd=Background.jpg
    title %NameScript%
    color F0
    echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    echo ::                                 %NameScript% 07/09/2018                               ::
    echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    pushd "%~dp0"
    echo. Replace Default LockScreen and Wallpaper
    takeown /f %SystemRoot%\WEB\wallpaper\Windows\img0.jpg
    takeown /f %SystemRoot%\Web\4K\Wallpaper\Windows\*.*
    takeown /f %SystemRoot%\WEB\Screen\*.*
    icacls %SystemRoot%\WEB\wallpaper\Windows\img0.jpg /Grant System:(F)
    icacls %SystemRoot%\Web\4K\Wallpaper\Windows\*.* /Grant System:(F)
    icacls %SystemRoot%\WEB\Screen\*.* /Grant System:(F)
    del %SystemRoot%\WEB\wallpaper\Windows\img0.jpg
    del /q %SystemRoot%\Web\4K\Wallpaper\Windows\*.*
    del /q %SystemRoot%\WEB\Screen\*.*
    copy %PicToAdd% %SystemRoot%\WEB\wallpaper\Windows\img0.jpg
    copy 4k\*.* %SystemRoot%\Web\4K\Wallpaper\Windows
    copy %PicToAdd% %SystemRoot%\WEB\Screen\img100.jpg
    copy %PicToAdd% %SystemRoot%\WEB\Screen\img105.jpg
    echo. LockScreen Tools TIps and Rotation Disable
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /V RotatingLockScreenOverlayEnabled /T REG_DWORD /D 0 /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /T REG_DWORD /V RotatingLockScreenEnabled /D 0 /F
    echo. LockScreen BING Rotation Disable
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V LockImageFlags /T REG_DWORD /D 00000000 /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V LockScreenOptions /T REG_DWORD /D 00000000 /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V CreativeId /T REG_SZ /D "" /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V DescriptionText /T REG_SZ /D "" /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V ActionText /T REG_SZ /D "" /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V ActionUri /T REG_SZ /D "" /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V PlacementId /T REG_SZ /D "" /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V ClickthroughToken /T REG_SZ /D ""
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V ImpressionToken /T REG_SZ /D "" /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V CreativeJson /T REG_SZ /D "" /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V PortraitAssetPath /T REG_SZ /D "C:\Windows\Web\Screen\img100.jpg" /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V LandscapeAssetPath /T REG_SZ /D "C:\Windows\Web\Screen\img100.jpg" /F
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V HotspotImageFolderPath /T REG_SZ /D "C:\Windows\Web\Screen\img100.jpg" /F
    echo. Screen SpotLight Disable
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /V DisableWindowsSpotlightFeatures /T REG_DWORD /D 00000001 /F
    echo. Set Enforced Lock Screen
    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization" /V LockScreenImage /T REG_SZ /D C:\Windows\Web\Screen\img100.jpg /F
    RMDIR /S /Q "%WINDIR%\Setup\Scripts"
    exit
    
    Voilà ! :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    753
    423
    30
    #2 Chibi ANUBIS, Sep 6, 2018
    Last edited: Sep 7, 2018
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. wsdyleon

    wsdyleon MDL Novice

    Jul 17, 2015
    2
    0
    0
    does work for ltsc 2018(2019)?
     
  4. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    753
    423
    30
    Probably yes :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...