鉴于小弟观察远景上的这个帖子:http://bbs.pcbeta.com/viewthread-1614503-1-1.html
感觉怪怪的,应该不是他原创的,但没有标注出处,所以特地去翻查了一下,果然不出我所料,最初来源是:
http://forums.mydigitallife.info/threads/62367-Windows-10-Login-Screen-Background-Changer!
My Digital Life论坛,发表于2015年7月14日05:52(时区GMT+8,与北京时间相同),并且有懒人版更换方法。
证据:
MDL:
远景:
我给出MDL上原作者发出的懒人版修改器:
还有原作者提供的代码的源地址:http://pastebin.com/aMBrHRwd (先破GFW,你懂的。)代码:
- $priPath = “$env:windir\SystemResources\Windows.UI.Logon\Windows.UI.Logon.pri”
- $outputPath = “.\Windows.UI.Logon_new.pri”
- $replacementPath = “.\IMGP0001.JPG”
- $inputStream = [System.IO.File]::OpenRead($priPath)
- $outputStream = [System.IO.File]::Create($outputPath)
- $replacementStream = [System.IO.File]::OpenRead($replacementPath)
- $inputReader = New-Object System.IO.BinaryReader -ArgumentList $inputStream
- $outputWriter = New-Object System.IO.BinaryWriter -ArgumentList $outputStream
- $inputStream.CopyTo($outputStream)
- $replacementLengthAligned = ([Math]::Ceiling($replacementStream.Length / 8) * 8)
- # header
- $inputStream.Seek(0x14, “Begin”) | Out-Null
- $headerLength = $inputReader.ReadUInt32()
- $inputStream.Seek(0xB8, “Begin”) | Out-Null
- $dataitemOffset = $inputReader.ReadUInt32()
- $origDataitemLength = $inputReader.ReadUInt32()
- $dataitemLength = $origDataitemLength + $replacementLengthAligned
- $outputStream.Seek(0xBC, “Begin”) | Out-Null
- $outputWriter.Write([int]$dataitemLength)
- # dataitem
- $outputStream.Seek($headerLength + $dataitemOffset + 0x18, “Begin”) | Out-Null
- $outputWriter.Write([int]$dataitemLength)
- $inputStream.Seek($headerLength + $dataitemOffset + 0x24, “Begin”) | Out-Null
- $stringCount = $inputReader.ReadUInt16()
- $blobCount = $inputReader.ReadUInt16()
- $origDataLength = $inputReader.ReadUInt32()
- $outputStream.Seek(0xC, “Current”) | Out-Null
- $outputWriter.Write([int]($origDataLength + $replacementLengthAligned))
- $outputStream.Seek($stringCount * 4, “Current”) | Out-Null
- for ($i = 0; $i -lt 10; $i++)
- {
- $outputWriter.Write($origDataLength)
- $outputWriter.Write([int]$replacementStream.Length)
- }
- $outputStream.Seek(($blobCount – 10) * 8, “Current”) | Out-Null
- # data
- $outputStream.Seek($origDataLength, “Current”) | Out-Null
- if ($outputStream.Length – $outputStream.Position -ne 0x18)
- {
- Write-Error “Not compatible with this PRI file.”
- }
- $replacementStream.CopyTo($outputStream)
- # footer
- $outputStream.Seek($replacementLengthAligned – $replacementStream.Length, “Current”) | Out-Null
- $outputWriter.Write(0xDEF5FADE)
- $outputWriter.Write([int]$dataitemLength)
- $outputWriter.Write(0xDEFFFADE)
- $outputWriter.Write(0x00000000)
- $outputWriter.Write([char[]]”mrm_pri2″)
- $outputStream.Seek(0xC, “Begin”) | Out-Null
- $outputWriter.Write([int]$outputStream.Length)
- $outputStream.Seek(-0xC, “End”) | Out-Null
- $outputWriter.Write([int]$outputStream.Length)
- $inputReader.Close()
- $outputWriter.Close()
- $replacementStream.Close()
复制代码
唉……朋友,下次转载别人,非自己原创的东西记得别再加个【By本人名字】,以免被打脸啊,我是好言相劝,希望你好好记住。