Skip to content

Commit 98ec4d9

Browse files
committed
Replace WMIC with PowerShell for retrieving file version
1 parent 368ba7e commit 98ec4d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

BuildArc.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ goto :eof
3737
:GET_EXE_VERSION
3838

3939
SET EXE_PATH=%1
40-
WMIC Path CIM_DataFile WHERE Name='%EXE_PATH:\=\\%' Get Version | findstr /v Version > _tmp_.txt
40+
powershell -NoLogo -NoProfile -Command "(Get-Item '%EXE_PATH%').VersionInfo.FileVersion" > _tmp_.txt
4141
set /P EXE_VERSIONTMP=<_tmp_.txt
4242
set EXE_VERSION=%EXE_VERSIONTMP: =%
4343
del _tmp_.txt

0 commit comments

Comments
 (0)