为什么此批处理文件无法更改壁纸(Windows 7) [英] Why does this Batch file fail to change the wallpaper (Windows 7)

查看:41
本文介绍了为什么此批处理文件无法更改壁纸(Windows 7)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个脚本可以运行(没有错误)来更改桌面墙纸.唯一的问题是它不会改变壁纸.注册表项被适当更改,以便位工作.只是重新加载不起作用.

I have a script that runs (without error) to change the desktop wallpaper. The only problem is that it doesn't change the wallpaper. The registry entry is changed appropriately, so that bits working. Just the reloading is not working.

:: Configure Wallpaper
REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "C:\Users\greynolds\AppData\Roaming\APOD Wallpaper\apod_wallpaper1.png"
REG ADD "HKCU\Control Panel\Desktop" /V WallpaperStyle /T REG_SZ /F /D 0
REG ADD "HKCU\Control Panel\Desktop" /V TileWallpaper /T REG_SZ /F /D 2
:: Make the changes effective immediately
%SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters

推荐答案

UpdatePerUserSystemParameters is a undocumented function AFAIK

UpdatePerUserSystemParameters is a undocumented function AFAIK

a> as: BOOL WINAPI UpdatePerUserSystemParameters(DWORD dwReserved,BOOL Enable)

ReactOS defines it as: BOOL WINAPI UpdatePerUserSystemParameters(DWORD dwReserved,BOOL Enable)

该函数定义意味着它不是您可以使用 RunDll32 调用的函数(您最终将随机参数传递给该函数)

That function definition means that it is not a function you can call with RunDll32 (You end up passing random parameters to the function)

这篇关于为什么此批处理文件无法更改壁纸(Windows 7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆