Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
什么';在Windows 10中使用Python设置新桌面墙纸的命令是什么?_Python_Windows_Windows 10 - Fatal编程技术网

什么';在Windows 10中使用Python设置新桌面墙纸的命令是什么?

什么';在Windows 10中使用Python设置新桌面墙纸的命令是什么?,python,windows,windows-10,Python,Windows,Windows 10,我有一个在Windows8.1中运行完美的脚本。在我最近升级到Windows10之后,这个脚本仍然可以工作,但并不能完全“保存”桌面壁纸。在脚本运行后,墙纸将更改,但在我注销、重新启动或关闭时,墙纸将恢复为旧墙纸 以下是执行与系统相关的任何操作的代码段: SPI_SETDESKWALLPAPER = 20 ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER,

我有一个在Windows8.1中运行完美的脚本。在我最近升级到Windows10之后,这个脚本仍然可以工作,但并不能完全“保存”桌面壁纸。在脚本运行后,墙纸将更改,但在我注销、重新启动或关闭时,墙纸将恢复为旧墙纸

以下是执行与系统相关的任何操作的代码段:

SPI_SETDESKWALLPAPER = 20 
ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER,
                                           0,
                                           r"C:\Users\me\image.jpg",
                                           0)

你有没有看过我的文件?如果您这样做了,那么您至少会说“我尝试在
fWinIni
参数中传递
SPIF\u UPDATEINIFILE
,并且…”之类的话