Skip to content

Commit

Permalink
[hashmyfiles.vm] Add config file
Browse files Browse the repository at this point in the history
Add config file to change default columns and enabling marking odd
columns. Correct also the tool name that should be HashMyFiles (as that
is the name of the `.exe`).
  • Loading branch information
Ana06 committed Jan 10, 2025
1 parent e7eab51 commit 4c30972
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/hashmyfiles.vm/hashmyfiles.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>hashmyfiles.vm</id>
<version>0.0.0.20240411</version>
<version>0.0.0.20250110</version>
<description>HashMyFiles is small utility that allows you to calculate the MD5 and SHA1 hashes of one or more files in your system. You can easily copy the MD5/SHA1 hashes list into the clipboard, or save them into text/html/xml file.</description>
<authors>Nir Sofer</authors>
<dependencies>
Expand Down
12 changes: 8 additions & 4 deletions packages/hashmyfiles.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ $ErrorActionPreference = 'Stop'
Import-Module vm.common -Force -DisableNameChecking

try {
$toolName = 'hashmyfiles'
$toolName = 'HashMyFiles'
$category = 'File Information'

$zipUrl = "https://www.nirsoft.net/utils/hashmyfiles.zip"
$zipUrl_64 = "https://www.nirsoft.net/utils/hashmyfiles-x64.zip"

$executablePath = (VM-Install-From-Zip $toolName $category $zipUrl -zipUrl_64 $zipUrl_64)[-1]
VM-Add-To-Right-Click-Menu $toolName "HashMyFiles" "`"$executablePath`" /file `"%1`"" "$executablePath"
VM-Add-To-Right-Click-Menu $toolName "HashMyFiles" "`"$executablePath`" /file `"%1`"" "$executablePath" -type "directory"
$toolDir, $executablePath = (VM-Install-From-Zip $toolName $category $zipUrl -zipUrl_64 $zipUrl_64)
VM-Add-To-Right-Click-Menu $toolName $toolName "`"$executablePath`" /file `"%1`"" "$executablePath"
VM-Add-To-Right-Click-Menu $toolName $toolName "`"$executablePath`" /file `"%1`"" "$executablePath" -type "directory"

# Copy configuration file to tool directory
$packageToolDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
Copy-Item "$packageToolDir\$toolName.cfg" -Destination $toolDir
} catch {
VM-Write-Log-Exception $_
}
3 changes: 3 additions & 0 deletions packages/hashmyfiles.vm/tools/hashmyfiles.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[General]
MarkOddEvenRows=1
Columns=A0 00 00 00 DC 00 02 00 00 00 04 00 00 00 05 00 A4 01 03 00 00 00 06 00 00 00 07 00 00 00 01 00 8C 00 09 00 8C 00 0A 00 00 00 0B 00 5A 00 08 00 00 00 0C 00 00 00 0D 00 00 00 0E 00 00 00 0F 00 00 00 10 00 00 00 11 00 00 00 12 00 00 00 13 00

0 comments on commit 4c30972

Please sign in to comment.