windows stuff

This commit is contained in:
doyle 2022-08-01 15:15:44 +10:00
parent f83b8b132c
commit ddc95ccbab

View File

@ -1,6 +1,6 @@
@echo off @echo off
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
REM Win Helpers - Version 4 REM Win Helpers - Version 5
call %* call %*
goto exit goto exit
@ -73,7 +73,7 @@ if not exist "!file!" (
) )
REM Calculate hash REM Calculate hash
for /F "tokens=2 delims= " %%c in ('powershell -NoLogo -NoProfile -NonInteractive Get-FileHash -algorithm !algorithm! \"!file!\" ') do ( set "actual=%%c" ) for /F %%c in ('powershell -NoLogo -NoProfile -NonInteractive "Get-FileHash -algorithm !algorithm! \"!file!\" | Select-Object -ExpandProperty Hash "') do ( set "actual=%%c" )
REM Verify Hash REM Verify Hash
if /I "!expected!" neq "!actual!" ( if /I "!expected!" neq "!actual!" (