【打脸,附最初来源】更换Windows 10 Build 10162或更高版本的登录画面-远景论坛-微软极客社区

鉴于小弟观察远景上的这个帖子: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上原作者发出的懒人版修改器:

本帖隐藏的内容

Windows 10 Login Background Changer.zip

(62.83 KB, 下载次数: 113)

还有原作者提供的代码的源地址:http://pastebin.com/aMBrHRwd (先破GFW,你懂的。)代码:

  1. $priPath = “$env:windir\SystemResources\Windows.UI.Logon\Windows.UI.Logon.pri”

  2. $outputPath = “.\Windows.UI.Logon_new.pri”

  3. $replacementPath = “.\IMGP0001.JPG”

  4. $inputStream = [System.IO.File]::OpenRead($priPath)

  5. $outputStream = [System.IO.File]::Create($outputPath)

  6. $replacementStream = [System.IO.File]::OpenRead($replacementPath)

  7. $inputReader = New-Object System.IO.BinaryReader -ArgumentList $inputStream

  8. $outputWriter = New-Object System.IO.BinaryWriter -ArgumentList $outputStream

  9. $inputStream.CopyTo($outputStream)

  10. $replacementLengthAligned = ([Math]::Ceiling($replacementStream.Length / 8) * 8)

  11. # header

  12. $inputStream.Seek(0x14, “Begin”) | Out-Null

  13. $headerLength = $inputReader.ReadUInt32()

  14. $inputStream.Seek(0xB8, “Begin”) | Out-Null

  15. $dataitemOffset = $inputReader.ReadUInt32()

  16. $origDataitemLength = $inputReader.ReadUInt32()

  17. $dataitemLength = $origDataitemLength + $replacementLengthAligned

  18. $outputStream.Seek(0xBC, “Begin”) | Out-Null

  19. $outputWriter.Write([int]$dataitemLength)

  20. # dataitem

  21. $outputStream.Seek($headerLength + $dataitemOffset + 0x18, “Begin”) | Out-Null

  22. $outputWriter.Write([int]$dataitemLength)

  23. $inputStream.Seek($headerLength + $dataitemOffset + 0x24, “Begin”) | Out-Null

  24. $stringCount = $inputReader.ReadUInt16()

  25. $blobCount = $inputReader.ReadUInt16()

  26. $origDataLength = $inputReader.ReadUInt32()

  27. $outputStream.Seek(0xC, “Current”) | Out-Null

  28. $outputWriter.Write([int]($origDataLength + $replacementLengthAligned))

  29. $outputStream.Seek($stringCount * 4, “Current”) | Out-Null

  30. for ($i = 0; $i -lt 10; $i++)

  31. {

  32.     $outputWriter.Write($origDataLength)

  33.     $outputWriter.Write([int]$replacementStream.Length)

  34. }

  35. $outputStream.Seek(($blobCount – 10) * 8, “Current”) | Out-Null

  36. # data

  37. $outputStream.Seek($origDataLength, “Current”) | Out-Null

  38. if ($outputStream.Length – $outputStream.Position -ne 0x18)

  39. {

  40.     Write-Error “Not compatible with this PRI file.”

  41. }

  42. $replacementStream.CopyTo($outputStream)

  43. # footer

  44. $outputStream.Seek($replacementLengthAligned – $replacementStream.Length, “Current”) | Out-Null

  45. $outputWriter.Write(0xDEF5FADE)

  46. $outputWriter.Write([int]$dataitemLength)

  47. $outputWriter.Write(0xDEFFFADE)

  48. $outputWriter.Write(0x00000000)

  49. $outputWriter.Write([char[]]”mrm_pri2″)

  50. $outputStream.Seek(0xC, “Begin”) | Out-Null

  51. $outputWriter.Write([int]$outputStream.Length)

  52. $outputStream.Seek(-0xC, “End”) | Out-Null

  53. $outputWriter.Write([int]$outputStream.Length)

  54. $inputReader.Close()

  55. $outputWriter.Close()

  56. $replacementStream.Close()

复制代码

唉……朋友,下次转载别人,非自己原创的东西记得别再加个【By本人名字】,以免被打脸啊,我是好言相劝,希望你好好记住。

来源URL:http://bbs.pcbeta.com/viewthread-1616127-1-1.html