Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to add a right-click calculation file MD5 using VBS

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces how to use VBS to add right-click calculation file MD5, the article is very detailed, has a certain reference value, interested friends must read it!

Recently, related backups are more frequent, in order to verify the integrity of files, always have to open a file HASH verification tool, more troublesome, so write this thing, the file is a bit slow to calculate when the file is large, the MD5 value of the file is saved in the clipboard! The effect is as shown in the figure:

How to use it:

1. First import the GetMD5.reg file into the registry to add the right-click menu, the GetMD5.reg code is as follows:

The copy code is as follows:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ *\ shell\ HASH (& G)\ command]

@ = "WScript.exe / / nologo c:\\ windows\\ system32\\ GetMD5.vbs\"% 1\ "

two。 Copy GetMD5.vbs to c:\ windows\ system32\, which completes all operations. The GetMD5.vbs code is as follows:

The copy code is as follows:

Public MD5Value

MD5Sum (WScript.Arguments (0))

SetClipboardText ("MD5:" & MD5Value & ", FilePath:" & WScript.Arguments (0))

Function MD5Sum (filename)

Dim MyStream, MyHashed, MD5Value

Set MyStream = CreateObject ("ADODB.Stream")

MyStream.Type = 1

MyStream.Open ()

MyStream.LoadFromFile (filename)

Set MyHashed = CreateObject ("CAPICOM.HashedData")

MyHashed.Algorithm = 3

MyHashed.Hash (MyStream.Read ())

MyStream.Close

MD5Value = MyHashed.Value

End Function

Sub SetClipboardText (Text)

Dim Word

Set Word = CreateObject ("Word.Application")

Word.Documents.Add

Word.Selection.Text = Text

Word.Selection.Copy

Word.Quit False

End Sub

The above is all the contents of the article "how to add a right-click calculation file MD5 using VBS". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report