Windows 10 右健添加原生文件 Hash 校验功能(MD5、SHA1等)

  才发现原来 Windows 10 已经提供了原生的文件 Hash 校验功能,这个功能集成在 Windows PowerShell 中。但是在 PowerShell 使用它需要敲命令,这个不适合一般用户,太麻烦。既然有相关的命令,就想到了何不将它简单化?没错,就是添加到鼠标右键。

  支持的校验类型包含了MD5、SHA1、MACTripleDES、RIPEMD160、SHA256、SHA384、SHA512,先来看看效果吧,如下图:

Windows 10 添加 Hash

  经测试,代码如下。将它复制保存为.reg文件,右击“合并”即可实现导入,无需重启电脑,马上生效。

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT*shell文件哈希校验]

"SubCommands"="MACTripleDES;MD5;RIPEMD160;SHA1;SHA256;SHA384;SHA512"

"MUIVerb"="文件哈希校验"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellMACTripleDES]

@="MACTripleDES"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellMACTripleDEScommand]

@="PowerShell Get-FileHash -Algorithm MACTripleDES \"%1\" | format-list;“按任意键退出...”;[Console]::Readkey() | Out-Null;exit"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellMD5]

@="MD5"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellMD5command]

@="PowerShell Get-FileHash -Algorithm MD5 \"%1\" | format-list;“按任意键退出...”;[Console]::Readkey() | Out-Null;exit"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellRIPEMD160]

@="RIPEMD160"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellRIPEMD160command]

@="PowerShell Get-FileHash -Algorithm RIPEMD160 \"%1\" | format-list;“按任意键退出...”;[Console]::Readkey() | Out-Null;exit"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellSHA1]

@="SHA1"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellSHA1command]

@="PowerShell Get-FileHash -Algorithm SHA1 \"%1\" | format-list;“按任意键退出...”;[Console]::Readkey() | Out-Null;exit"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellSHA256]

@="SHA256"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellSHA256command]

@="PowerShell Get-FileHash -Algorithm SHA256 \"%1\" | format-list;“按任意键退出...”;[Console]::Readkey() | Out-Null;exit"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellSHA384]

@="SHA384"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellSHA384command]

@="PowerShell Get-FileHash -Algorithm SHA384 \"%1\" | format-list;“按任意键退出...”;[Console]::Readkey() | Out-Null;exit"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellSHA512]

@="SHA512"

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellSHA512command]

@="PowerShell Get-FileHash -Algorithm SHA512 \"%1\" | format-list;“按任意键退出...”;[Console]::Readkey() | Out-Null;exit"

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据