Change Wallpaper and Lockscreen

Discussion in 'Windows 10' started by Chibi ANUBIS, Nov 11, 2019.

  1. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    991
    651
    30
    #1 Chibi ANUBIS, Nov 11, 2019
    Last edited: Nov 12, 2019
    I create a OEM Script for change Wallpaper and Lockscreen :

    OEM.cmd
    Code:
    
    SET PicToAdd=OEMBACKGROUND.jpg
    
    pushd "%~dp0"
    
    ECHO *************************************
    ECHO Replace Default LockScreen and Wallpaper
    ECHO *************************************
    
    takeown /f %SystemRoot%\WEB\wallpaper\Windows\img0.jpg
    icacls %SystemRoot%\WEB\wallpaper\Windows\img0.jpg /reset /T /Q
    del %SystemRoot%\WEB\wallpaper\Windows\img0.jpg
    copy %PicToAdd% %SystemRoot%\WEB\wallpaper\Windows\img0.jpg
    
    takeown /f %SystemRoot%\WEB\Screen\*.*
    icacls %SystemRoot%\WEB\Screen\*.* /reset /T /Q
    del /q %SystemRoot%\WEB\Screen\*.*
    copy %PicToAdd% %SystemRoot%\WEB\Screen\img100.jpg
    copy %PicToAdd% %SystemRoot%\WEB\Screen\img105.jpg
    
    if not exist "4K\" goto REGISTRY
    takeown /f %SystemRoot%\Web\4K\Wallpaper\Windows\*.*
    icacls %SystemRoot%\Web\4K\Wallpaper\Windows\*.* /reset /T /Q
    del /q %SystemRoot%\Web\4K\Wallpaper\Windows\*.*
    copy 4K\*.* %SystemRoot%\Web\4K\Wallpaper\Windows
    
    :REGISTRY
    ECHO *************************************
    ECHO LockScreen Tools TIps and Rotation Disable
    ECHO *************************************
    
    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 *************************************
    ECHO LockScreen BING Rotation Disable
    ECHO *************************************
    
    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 *************************************
    ECHO Screen SpotLight Disable
    ECHO *************************************
    
    REG ADD "HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /V DisableWindowsSpotlightFeatures /T REG_DWORD /D 00000001 /F
    
    ECHO *************************************
    ECHO Set Enforced Lock Screen
    ECHO *************************************
    
    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization" /V LockScreenImage /T REG_SZ /D C:\Windows\Web\Screen\img100.jpg /F
    
    exit /b
    
    I just tried your script, and I had the same bug, when the sessions is created, the wallpaper is visible in the control panel for Theme and LockScreen, but I have again the wallpaper blue on the desktop... I understand nothing :confused:

    I work on VM, 19H1 and I test the Core Edition.

    Need help !!!
    Thanks in advance
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    991
    651
    30
    #2 Chibi ANUBIS, Nov 11, 2019
    Last edited: Nov 12, 2019
    (OP)
    Script tested in Audit Mode :

    Code:
    @echo off
    
    REM This is for Audit Mode Testing....
    
    SET "PicToAdd=OEMBACKGROUND.jpg"
    
    IF NOT EXIST "%PicToAdd%" Echo Error: No OEMBackground.jpg found. & TIMEOUT /T 2 >nul & GOTO :FinishScript
    
    Set "DefUserHive=%SystemDrive%\Users\Default\NTUser.dat"
    
    pushd "%~dp0"
    
    IF EXIST "%DefUserHive%" (
       REG load "HKU\DEFAULT" "%DefUserHive%" >NUL 2>&1
       TIMEOUT /T 1 >NUL 2>&1
    )
    
    ECHO *************************************
    ECHO Replace Default LockScreen and Wallpaper
    ECHO *************************************
    
    takeown /f "%SystemRoot%\WEB\wallpaper\Windows\img0.jpg"
    icacls "%SystemRoot%\WEB\wallpaper\Windows\img0.jpg" /reset /T /Q
    del "%SystemRoot%\WEB\wallpaper\Windows\img0.jpg"
    IF EXIST "%PicToAdd%" copy "%PicToAdd%" "%SystemRoot%\WEB\wallpaper\Windows\img0.jpg"
    
    takeown /f "%SystemRoot%\WEB\Screen\*.*"
    icacls "%SystemRoot%\WEB\Screen\*.*" /reset /T /Q
    del /q "%SystemRoot%\WEB\Screen\*.*"
    IF EXIST "%PicToAdd%" copy "%PicToAdd%" "%SystemRoot%\WEB\Screen\img100.jpg"
    IF EXIST "%PicToAdd%" copy "%PicToAdd%" "%SystemRoot%\WEB\Screen\img105.jpg"
    
    if not exist "4K\" goto :REGISTRY
    takeown /f "%SystemRoot%\Web\4K\Wallpaper\Windows\*.*"
    icacls "%SystemRoot%\Web\4K\Wallpaper\Windows\*.*" /reset /T /Q
    del /q "%SystemRoot%\Web\4K\Wallpaper\Windows\*.*"
    IF EXIST "4K\*.*" copy "4K\*.*" "%SystemRoot%\Web\4K\Wallpaper\Windows"
    
    :REGISTRY
    ECHO *************************************
    ECHO LockScreen Tools Tips and Rotation Disable
    ECHO *************************************
    
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /V "RotatingLockScreenOverlayEnabled" /T REG_DWORD /D "0" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /T REG_DWORD /V "RotatingLockScreenEnabled" /D "0" /F
    
    ECHO *************************************
    ECHO LockScreen BING Rotation Disable
    ECHO *************************************
    
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "LockImageFlags" /T REG_DWORD /D "0" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "LockScreenOptions" /T REG_DWORD /D "0" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "CreativeId" /T REG_SZ /D "" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "DescriptionText" /T REG_SZ /D "" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "ActionText" /T REG_SZ /D "" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "ActionUri" /T REG_SZ /D "" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "PlacementId" /T REG_SZ /D "" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "ClickthroughToken" /T REG_SZ /D ""
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "ImpressionToken" /T REG_SZ /D "" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "CreativeJson" /T REG_SZ /D "" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "PortraitAssetPath" /T REG_SZ /D "%SystemDrive%\Windows\Web\Screen\img100.jpg" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "LandscapeAssetPath" /T REG_SZ /D "%SystemDrive%\Windows\Web\Screen\img100.jpg" /F
    REG ADD "HKU\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /V "HotspotImageFolderPath" /T REG_SZ /D "%SystemDrive%\Windows\Web\Screen\img100.jpg" /F
    
    ECHO *************************************
    ECHO Screen SpotLight Disable
    ECHO *************************************
    
    REG ADD "HKU\DEFAULT\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /V "DisableWindowsSpotlightFeatures" /T REG_DWORD /D "1" /F
    
    REM Unloaded Twice to make sure it is unloaded!
    REG unload "HKU\DEFAULT" >NUL 2>&1
    TIMEOUT /T 1 /NOBREAK >nul
    REG unload "HKU\DEFAULT" >NUL 2>&1
    
    ECHO *************************************
    ECHO Set Enforced Lock Screen
    ECHO *************************************
    
    REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /V "LockScreenImage" /T REG_SZ /D "%SystemDrive%\Windows\Web\Screen\img100.jpg" /F
    
    :FinishScript
    exit /b
    
    But is a same bug...
    Thanks to mxman2k
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. luzea

    luzea MDL Addicted

    Apr 25, 2019
    673
    697
    30
    :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    991
    651
    30
    Hey ! refresh the thread, is not deleted now :chair:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    4,919
    5,849
    150
    developer of stuff is normal ...:D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    991
    651
    30
    I work in since one week, I become crazy :w00t2:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    4,919
    5,849
    150
    calm friend you're capable I'm sure of this:)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    3,212
    8,021
    120
    Audit mode can drive you crazy! :p :D:D

    When you exit the mode and 'reseal to oobe', certain files and registry entries are deleted/reset as designed by M$.

    There are some limitations in Audit Mode and you need to find workarounds at times, diving into that specialized mode without some basic knowledge can cause major corruptions of the OS.

    I have fell foul to the dreaded 'Image is not serviceable' error way too many times.

    Please see the PM sent that may give you some pointers/help to achieve your goal. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    991
    651
    30
    Ahah thanks for your compassion my friends :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    991
    651
    30
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    4,919
    5,849
    150
    #11 Tiger-1, Nov 12, 2019
    Last edited: Nov 12, 2019
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    991
    651
    30
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    991
    651
    30
    Thread Closed !
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. ruuu7

    ruuu7 MDL Member

    Mar 7, 2015
    172
    38
    10
    No. ;) not y3t
     
  15. Snuffy

    Snuffy MDL Expert

    Jan 7, 2008
    1,236
    610
    60
    i usually open from desktop with personalize, then change to lockscreen or background.. fast easy and caveman easy to do.