gpt4 book ai didi

linux - 如何在 Linux 上从 Windows 注册表检索区域设置?

转载 作者:太空宇宙 更新时间:2023-11-04 04:52:13 26 4
gpt4 key购买 nike

我需要知道如何从 Windows 注册表、安装在 Linux 系统上的 Windows(7 或 10)分区检索区域设置。请注意,我无法直接使用 Windows。

最好的方法是将它们直接显示到终端中,但我想这不会像使用 cat registry_file | grep key 那么容易。 .

我主要对注册表项感兴趣,例如 sCountry , Locale , LocaleNamesLanguage (但可能还有更多我不知道的,因为我更多的是一个 Linux 人)。据我所知,这些 key 出于不同的目的分散在系统范围内或每个用户目录中,但我找不到如何读取这些 key 的最终答案,特别是对于一个用户而言。

在这种情况下可以实现这一目标吗?

我的问题不重复;我已经看过了:

最佳答案

区域设置注册表

所需的系统区域设置存储在:

HKEY_USERS\.DEFAULT\Control Panel\International\sCountry

HKEY_USERS\.DEFAULT\Control Panel\International\Locale

HKEY_USERS\.DEFAULT\Control Panel\International\sLanguage

sCountry仅用于符号格式,您还可以使用区域设置信息并将其链接到此表:

https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx

此外,您可以查看以下注册表:

HKEY_CURRENT_USER\Control Panel\International\Geo\Nation

代表当前位置,如下表所示:

https://msdn.microsoft.com/en-us/library/windows/desktop/dd374073%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

<小时/>

文件系统上的注册表位置

摘自grarity的回答: https://superuser.com/a/289963

  • Registry: HKLM\SYSTEM

    File: \WINDOWS\system32\config\system

    • Registry: HKLM\SOFTWARE

    File: \WINDOWS\system32\config\software

    • Registry: HKU\<i><user-SID></i> (aka HKCU)

    File: <i><home></i>\NTUSER.DAT

    • Registry: HKU\<i><user-SID></i>_Classes (aka HKCU\Software\Classes)

    File: <i><home></i>\Local Settings\Application
    Data\Microsoft\Windows\UsrClass.dat

    File: <i><home></i>\AppData\Local\Microsoft\usrclass.dat – as of Windows Vista

    • Registry: HKU\.DEFAULT (the system account)

    File: \WINDOWS\system32\config\default

Note that HKU\.DEFAULT is the system account. It is not the template account.

The template account's files are at \Documents and Settings\Default
User
(substitute for <home> above).

<小时/>

编辑工具

  • hivex :

    This program provides a simple shell for navigating Windows Registry 'hive' files. It uses the hivex library for access to these binary files. https://linux.die.net/man/1/hivexsh

  • chntpw :

    chntpw is a utility to view some information and reset user passwords in a Windows NT/2000 SAM userdatabase file (...). In addition it contains a simple registry editor and a hex-editor with which the information contained in a registry file can be browsed and modified. http://manpages.ubuntu.com/manpages/cosmic/man8/chntpw.8.html

<小时/>

其他引用资料:

How to find world region (or country) or language from the windows registry? https://superuser.com/questions/289955/access-windows-registry-from-ubuntu/289963#289963 https://unix.stackexchange.com/questions/214856/how-can-i-access-the-windows-registry-from-linux

关于linux - 如何在 Linux 上从 Windows 注册表检索区域设置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55014850/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com