2012年8月11日土曜日

RHash 右鍵選單 REG+VBS

REG 部份:(VBS 的路徑要設定)
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\RHash]

[HKEY_CLASSES_ROOT\*\shell\RHash\command]
@="wscript.exe C:\\portable\\RHash.vbs \"%1\""
VBS 部份:(RHash 主程式的路徑要設定)
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim argument(2)
argument(0) = "C:\portable\RHash-1.2.9-win64\rhash.exe" 'application path
Dim argumentselect
Do
argumentselect = InputBox("1 = MD5" &Chr(10) & _
                          "2 = SHA1" &Chr(10) & _
                          "3 = ED2K" &Chr(10) & _
                          "4 = CHECK" &Chr(10) & _
                          "Select Feature (Other Number=Exit)" , _
                          "Input A Number For Your Choice")
Loop While IsNumeric(argumentselect) = Flase
Select Case argumentselect
Case 1
 argument(1) = "-M"
Case 2
 argument(1) = "-H"
Case 3
 argument(1) = "-E"
Case 4
 argument(1) = "-c"
Case else
 WScript.Quit
End select
argument(2) = WScript.Arguments.Item(0)
Return = WshShell.run("%COMSPEC% /u /k" &Chr(32) &argument(0) _
                                        &Chr(32) &argument(1) _
                                        &Chr(32) &Chr(34) &argument(2) &Chr(34) , 1 , True)

0 件のコメント: