我现在正在使用Ubuntu遇到一些困难,希望能得到一些帮助。
目前我是通过USB闪存驱动器运行Ubuntu,因为Windows 7不知怎么的就消失了。
我该如何在Ubuntu中找到我的笔记本硬盘上的Windows产品密钥呢?
目前我是通过USB闪存驱动器运行Ubuntu,因为Windows 7不知怎么的就消失了。
我该如何在Ubuntu中找到我的笔记本硬盘上的Windows产品密钥呢?
sudo apt install --reinstall ubuntu-desktop
这个答案不是我写的,而是由Thomas在Superuser上写的,请在那里投票,如果你在这里投票,谢谢。
Linux有一个很棒的工具叫做chntpw。你可以通过以下方式轻松地在Debian/Ubuntu上获取它:
sudo apt install chntpw
要查看相关的注册表文件,请挂载Windows磁盘并像这样打开它:
chntpw -e /path/to/windisk/Windows/System32/config/SOFTWARE
现在,要获取解码后的DigitalProductId,请输入以下命令:
dpi \Microsoft\Windows NT\CurrentVersion\DigitalProductId
下面的评论说:
相关注册表文件的路径是/path/to/windisk/Windows/System32/config/RegBack/SOFTWARE
SOFTWARE
作为文件名。 - Paddy Landauchntpw
的功能真是太棒了。 - dhaupinchntpw -e /media/sdb1/WINDOWS/system32/config/software
。 - rickfoosusaWindows/system32/config/software
。 - TekTimmymount -t ntfs-3g /dev/<device> /mnt -o remove_hiberfile
。 - shrimpwagonHKLM\Software\Microsoft\Windows NT\CurrentVersion\DigitalProductId
REG_BINARY
。意思是它只是一组字节。你可以通过chntpw
转储它们,或者手动复制它们。EncodedId = DigitalProductId.Range(52, 52+14)
Characters = "BCDFGHJKMPQRTVWXY2346789"
ProductKey = ""
FOR i = 0 TO 24
c = 0
FOR j = 14 TO 0 STEP -1
# Shift the current contents of c to the left by 1 byte
# and xor it with the next byte of our id
c = (c * 256) XOR EncodedId[j]
# Put the result of the divison back into the array
EncodedId[j] = FLOOR(c / 24)
# Calculate remainder of c
c = c MOD 24
LOOP
# Take character at position c and prepend it to the ProductKey
ProductKey = Characters[c] + ProductKey
LOOP
FOR i = 4 TO 1 STEP -1
ProductKey = ProductKey.Insert(i * 5, "-")
LOOP
PRINT(ProductKey)
/sys/firmware/acpi/tables/MSDM
只适用于原始设备制造商(OEM)许可证吗? - King Midas
sudo cat /sys/firmware/acpi/tables/MSDM
- Charles Green