欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 运维知识 > windows >内容正文

windows

[windows]windows 10 锁屏壁纸保存方法

发布时间:2023/12/31 windows 50 豆豆
生活随笔 收集整理的这篇文章主要介绍了 [windows]windows 10 锁屏壁纸保存方法 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

windows 锁屏壁纸功能叫做spotlight,其实壁纸都下载在本地电脑上,只需要拷贝出来就行了。

脚本

保存为 spotlight.ps1 ,使用右键powershell运行

在个人文件夹的Pictures下有两个Horizontal和Vertical保存着图片

add-type -AssemblyName System.Drawing New-Item "$($env:USERPROFILE)\Pictures\Spotlight" -ItemType directory -Force; New-Item "$($env:USERPROFILE)\Pictures\Spotlight\CopyAssets" -ItemType directory -Force; New-Item "$($env:USERPROFILE)\Pictures\Spotlight\Horizontal" -ItemType directory -Force; New-Item "$($env:USERPROFILE)\Pictures\Spotlight\Vertical" -ItemType directory -Force; foreach($file in (Get-Item "$($env:LOCALAPPDATA)\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets\*")) {if ((Get-Item $file).length -lt 100kb) { continue }Copy-Item $file.FullName "$($env:USERPROFILE)\Pictures\Spotlight\CopyAssets\$($file.Name).jpg"; }foreach($newfile in (Get-Item "$($env:USERPROFILE)\Pictures\Spotlight\CopyAssets\*")) {$image = New-Object -comObject WIA.ImageFile;$image.LoadFile($newfile.FullName);if($image.Width.ToString() -eq "1920"){ Move-Item $newfile.FullName "$($env:USERPROFILE)\Pictures\Spotlight\Horizontal" -Force; }elseif($image.Width.ToString() -eq "1080"){ Move-Item $newfile.FullName "$($env:USERPROFILE)\Pictures\Spotlight\Vertical" -Force; } } Remove-Item "$($env:USERPROFILE)\Pictures\Spotlight\CopyAssets\*"; 复制代码

必应缤纷桌面

微软出品必应缤纷桌面

收集必应壁纸的网站

转载于:https://juejin.im/post/5d00a311f265da1bb47d5cd8

总结

以上是生活随笔为你收集整理的[windows]windows 10 锁屏壁纸保存方法的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。