console
@echo off
:: 替换为你的图片文件夹路径
set "folder=C:\Users\你的用户名\Pictures\SlideShow"
powershell -command "Add-Type -AssemblyName System.Windows.Forms; $form = New-Object Windows.Forms.Form; $form.WindowState = 'Maximized'; $form.BackgroundImageLayout = 'Zoom'; $pic = New-Object Windows.Forms.PictureBox; $pic.Dock = 'Fill'; $form.Controls.Add($pic); $timer = New-Object Windows.Forms.Timer; $timer.Interval = 3000; $images = Get-ChildItem '%folder%\*' -Include ('*.jpg','*.png'); $i=0; $timer.Add_Tick({ if ($i -ge $images.Count) { $i=0 }; $pic.Image = [System.Drawing.Image]::FromFile($images[$i].FullName); $i++ }); $timer.Start(); $form.ShowDialog()"