現在の月に基づいて Windows 10 の背景画像を自動的に設定するにはどうすればよいですか?

現在の月に基づいて Windows 10 の背景画像を自動的に設定するにはどうすればよいですか?

特定の画像ファイルを、その年の月に基づいて自分のマシンの背景として使用したいと思います。たとえば、January.png、February.png、March.png などの画像ファイルがあるとします。

次に、1 月中は January.png を背景にし、2 月中は February.png を背景にするなどします。理想的には、Windows 10 で現在の月の画像が自動的に設定されるように設定したいと思います。

Windows 10 では、スライドショーを背景として設定することがネイティブでサポートされていることは知っていますが、提供される最長の更新期間は 1 日であり、私には 1 か月 (一貫した単一の時間ではありません) が必要です。

サードパーティのソフトウェアを実装せずにこれを実行することは可能ですか?

答え1

これにより、月値が数値で取得されMM、12 月 (12 = 12 月) に基づいて、バックグラウンド パスにバックグラウンドが適用され、レジストリに追加されます。これをメモ帳ドキュメントにコピーし、.ps1 として保存すると、タスク スケジューラを使用して 1 日に 1 回、または月に 1 回など実行できます。

$month = get-date -format "MM"

if ($month == 01) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background01.jpg /f }
if ($month == 02) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background02.jpg /f }
if ($month == 03) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background03.jpg /f }
if ($month == 04) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background04.jpg /f }
if ($month == 05) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background05.jpg /f }
if ($month == 06) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background06.jpg /f }
if ($month == 07) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background07.jpg /f }
if ($month == 08) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background08.jpg /f }
if ($month == 09) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background09.jpg /f }
if ($month == 10) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background10.jpg /f }
if ($month == 11) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background11.jpg /f }
if ($month == 12) { reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d  C:\background12.jpg /f }

関連情報