w10install/scripts/disable-accountpicture.cmd
Michael H.G. Schmidt 6e3a477750 little reorg
2024-02-23 14:03:56 +01:00

60 lines
1.3 KiB
Batchfile

@echo off
set SCRIPT_SETTINGS=settings.cmd
set CUSTOM_SETTINGS=..\custom\settings.cmd
rem default: empty logo (disables all logos on logon screen)
set TARGET="%ALLUSERSPROFILE%\Microsoft\User Account Pictures"
set LOGO=config\user-empty.png
set logon_logo=0
echo ####### %0 #######
echo.
echo searching for SCRIPT settings ...
if NOT EXIST %SCRIPT_SETTINGS% (
echo INFO: config file %SCRIPT_SETTINGS% NOT FOUND
) else (
echo OK. Loading SCRIPT settings ...
call %SCRIPT_SETTINGS%
)
echo.
echo searching for CUSTOM settings ...
if NOT EXIST %CUSTOM_SETTINGS% (
echo INFO: config file %CUSTOM_SETTINGS% NOT FOUND
) else (
echo OK. Loading CUSTOM settings ...
call %CUSTOM_SETTINGS%
)
echo ++++++++++++++++++
echo logon_logo=%logon_logo%
echo ++++++++++++++++++
echo.
if %logon_logo% == 1 (
rem windows logo taken from: http://pngimg.com/image/23601
set LOGO=config\windows-logo.png
)
echo disabling account pictures on logon screen ...
for %%F in (
user-192
user
guest
) do (
move /Y %TARGET%\%%F.png %TARGET%\%%F.bak
copy /Y %LOGO% %TARGET%\%%F.png
)
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" ^
/v UseDefaultTile /t REG_DWORD /d 1 /f
echo ####### %0 #######