是否有运行或命令提示符命令可以更改 Windows 中的背景图像?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4407691/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 15:46:58  来源:igfitidea点击:

Is there a Run or command-prompt command that changes the background image in windows?

windowscommand

提问by code511788465541441

example..Run/cmd desktop.exe http:www.tinypic.com/blabla.jpg -s

例如..运行/cmd desktop.exe http:www.tinypic.com/blabla.jpg -s

回答by Vikram.exe

You can use command line utility reg.exe to do that. you have to modify the registry value:

您可以使用命令行实用程序 reg.exe 来执行此操作。您必须修改注册表值:

HKEY_CURRENT_USER\Control Panel\Desktop\WallPaper

Or you can create a file (say c:\foo.reg) with following content:

或者您可以创建一个包含以下内容的文件(比如 c:\foo.reg):

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"wallPaper" = "path_of_new_wallpaper"

and process it from cmd line as:

并将其从 cmd 行处理为:

regedit.exe /s c:\foo.reg

Setting the registry value isn't enough on all the flavor of windows os. You might have to reboot the machine for the changes to take effect. (I think there must a workaround to make it effective without rebooting the machine, but I have no idea about it).

在 Windows 操作系统的所有风格上设置注册表值是不够的。您可能必须重新启动计算机才能使更改生效。(我认为必须有一种解决方法可以在不重新启动机器的情况下使其有效,但我对此一无所知)。