Windows 8 Build 7776.0.fbl grfx dev1.100708-1700:修订间差异

第 170 行: 第 170 行:


=== Windows 应用商店 ===
=== Windows 应用商店 ===
==== Accessing the Store ====
==== 访问应用商店 ====
This build includes an extremely early version of the Windows Store that can be found in the <code>\Windows\System32</code> directory under the name <code>WinStore.exe</code>. The executable depends on Microsoft's own intranet-based store servers to function properly, and will not open by default as it looks for a file by the name of <code>users.ini</code> on a Microsoft intranet store server (<code>\\ericflo3\winstore</code>) to determine if someone's local user account is permitted to use the Windows Store. As the server only operated inside Microsoft, the application will fail to find it and will exit before displaying anything. It is however possible to patch the executable to remove this check or fool it by creating a seperate server under the same name that stores the <code>users.ini</code> file.
此版本包含 Windows 应用商店的一个非常早期版本,可以在 <code>\Windows\System32</code> 目录下找到,文件名为 <code>WinStore.exe</code>。此可执行文件依赖 Microsoft 自己的基于内联网的应用商店服务器才能正常运行,默认情况下无法打开,这是因为它会在 Microsoft 内联网应用商店服务器(<code>\\ericflo3\winstore</code>)上查找名为 <code>users.ini</code> 的文件,以确定某个本地用户帐户是否被允许使用 Windows 应用商店。由于此服务器仅在 Microsoft 内部运行,此应用将无法找到此文件,因此会在显示任何内容之前退出。不过,可以通过修改可执行文件以删除此检查,或者通过创建一个同名的独立服务器来存储 <code>users.ini</code> 文件从而欺骗应用。


Checking the function that evalutes the user's eligibility to use the Store will reveal that the Store is calling the Windows function <code>[https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getprivateprofileintw GetPrivateProfileIntW]</code> which attempts to read a value from the <code>users.ini</code> file, while also noting down a default value, in this case zero. By changing this value from 0 to 1, the Store will now open - thinking that the current user account is permitted to use it. This can easily be done by modifying the <code>0x9D9</code> offset of the <code>WinStore.exe</code> executable from <code>0x01</code> to <code>0x00</code> in a hex editor. Alternatively, the user can simply fool the Windows Store into believing that the <code>\\ericflo3\winstore</code> server still exists by setting up a second computer or virtual machine under the PC name of <code>ericflo3</code> to serve as a HomeGroup server, and then sharing a <code>winstore</code> folder containing the <code>users.ini</code> file while on the root of the <code>C:</code> drive.
检查评估用户是否符合使用存储器的函数,会发现存储调用了 Windows 函数 <code>[https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getprivateprofileintw GetPrivateProfileIntW]</code>,此函数尝试从 <code>users.ini</code> 文件中读取值,同时记录一个默认值,这里是零。将此值从 0 改为 1 后,应用商店将打开——认为当前用户帐户被允许使用此值。这可以通过在十六进制编辑器中将 <code>WinStore.exe</code> 执行文件的 <code>0x9D9</code> 偏移量从 <code>0x01</code> 改为 <code>0x00</code> 轻松实现。或者,用户也可以通过在 <code>C:</code> 驱动器根节点上设置第二台电脑或虚拟机,并使用电脑名称 <code>ericflo3</code> 来作为家庭组服务器,让 <code>\\ericflo3\winstore</code> 服务器仍然存在,然后在 C: 驱动器根节点共享包含 <code>users.ini</code> 文件的 winstore 文件夹,从而欺骗 Windows 应用商店,让它相信 <code>\\ericflo3\winstore</code> 服务器仍然存在。


After Windows Store opens, it will immediately attempt to contact an intranet server and then fail due to it not existing, displaying a could not connect message. The design of the Windows Store application is still very primitive in this build, only featuring a gray background, a dark gray bottom bar, a close button in the top right corner, and the aforementioned light gray box that specifies the application's name and that Windows Store cannot connect. The format for the <code>users.ini</code> file to allow the application to launch is as follows:
Windows 应用商店打开后,它会立即尝试联系一个内网服务器,但由于服务器不存在而失败,并显示无法连接的消息。在这个版本中,Windows应用商店应用的设计仍然非常原始,只包含灰色背景、深灰色底部栏、右上角的关闭按钮,以及前面提到的浅灰色框,用于显示应用名称和 Windows 应用商店无法连接的提示。允许应用启动的 <code>users.ini</code> 文件格式如下:
<syntaxhighlight lang="ini">
<syntaxhighlight lang="ini">
; Replace user1/user2 with the local user account name of the installation, and hostname1/hostname2 with the installation's computer name
; Replace user1/user2 with the local user account name of the installation, and hostname1/hostname2 with the installation's computer name