Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\HASH(G)\command]
@="WScript.exe //nologo c:\\windows\\system32\\GetMD5.vbs \"%1\""
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