Skip to content

Commit b05520d

Browse files
committed
Replace WMIC with PowerShell for retrieving file version
1 parent 21a04fa commit b05520d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

BuildArc.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ goto :eof
3333
:GET_EXE_VERSION
3434

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

0 commit comments

Comments
 (0)