利用Powershell提取Win10的windows聚焦图片

2018-07-16 11:03:00

有时候开机时会被为Windows的聚焦图片所吸引,但是我的电脑几乎不怎么关机...
从这6张图片就能看出来....

win10聚焦锁屏图片一般缓存在
“C:\Users\用户名\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets”
中,这些缓存文件没有后缀名,你只需要重命名加上.jpg就可以看到了

手动多么费劲了@(滑稽)
来人 把我的Powershell拿上来
新建一个txt ,复制下面代码进去,后缀名改为.ps1
双击会用记事本打开#(无奈) 要 右击 -> 使用Powershell 运行

# 将复制出来的缓存图片保存在下面的文件夹
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;
 
# 将横竖图片分别复制到对应的两个文件夹 在\Pictures\Spotlight内
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; }
}

但是有的人运行后 会黑人问号脸?? 肿么没有???
记得开启这个 Windows聚焦

突然想到前几天的事
因为tb小号心不够 我就去买了几十个0.01的壁纸商品
结果就有两家发货 而且其中一家里面就3个图片#(喷血) 打开另一家的链接...10多G的压缩包..#(暗地观察)
10多G图片 分享出来了 至于质量我就不知道了

当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »