sag*_*000 7 background batch-file wallpaper windows-7
我正在尝试创建一个批处理文件,该程序将在Windows 7上关闭程序时更改我的背景.我尝试使用它,但它不起作用,即使我注销并重新登录:
@echo off
reg /add HKCU\Control Panel\Desktop\WallPaper /v wallpaper /t REG_SZ /d c:\images\wallpaper.bmp
Run Code Online (Sandbox Code Playgroud)
ref*_*aim 16
您的命令中存在一些错误:
/的add命令.WallPaper末尾额外).这应该做的伎俩:
reg add "HKCU\Control Panel\Desktop" /v Wallpaper /f /t REG_SZ /d c:\images\wallpaper.bmp
Run Code Online (Sandbox Code Playgroud)
当然,如果壁纸路径包含空格,则必须将其括在引号中.
/f如果壁纸已经设置,我还添加了强制覆盖的键.