w10install/scripts/disable-accountpicture.cmd

60 lines
1.3 KiB
Batchfile
Raw Permalink Normal View History

2021-01-14 00:43:00 +01:00
@echo off
2023-01-22 12:56:24 +01:00
set SCRIPT_SETTINGS=settings.cmd
2024-02-23 14:03:56 +01:00
set CUSTOM_SETTINGS=..\custom\settings.cmd
2021-01-14 00:43:00 +01:00
rem default: empty logo (disables all logos on logon screen)
2023-01-22 12:56:24 +01:00
set TARGET="%ALLUSERSPROFILE%\Microsoft\User Account Pictures"
set LOGO=config\user-empty.png
2023-01-22 12:56:24 +01:00
set logon_logo=0
2021-03-13 13:06:52 +01:00
echo ####### %0 #######
2023-01-22 12:56:24 +01:00
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.
2024-02-21 11:58:08 +01:00
echo searching for CUSTOM settings ...
if NOT EXIST %CUSTOM_SETTINGS% (
echo INFO: config file %CUSTOM_SETTINGS% NOT FOUND
) else (
2024-02-21 11:58:08 +01:00
echo OK. Loading CUSTOM settings ...
call %CUSTOM_SETTINGS%
)
2021-03-31 01:11:03 +02:00
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
)
2021-03-07 17:23:21 +01:00
2021-01-14 00:43:00 +01:00
echo disabling account pictures on logon screen ...
2021-03-07 17:23:21 +01:00
for %%F in (
user-192
user
guest
) do (
move /Y %TARGET%\%%F.png %TARGET%\%%F.bak
copy /Y %LOGO% %TARGET%\%%F.png
)
2021-01-14 00:43:00 +01:00
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" ^
2023-02-08 16:12:23 +01:00
/v UseDefaultTile /t REG_DWORD /d 1 /f
2021-01-14 00:43:00 +01:00
echo ####### %0 #######