Skip to content

Commit 99547e8

Browse files
committed
Replace WMIC with PowerShell for retrieving file version
1 parent d5602c5 commit 99547e8

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
@@ -34,7 +34,7 @@ goto :eof
3434
:GET_EXE_VERSION
3535

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

0 commit comments

Comments
 (0)