- Aug
- 2,134
- 92
I have the following .BAT file;
The above runs and returns the correct results in CMD and PowerShell, and TCC-RT 25;
Version TCC-RT 25.00.27 x64
However, it does not return the correct results in TCC-RT 26;
Joe
Code:
@setlocal
@echo off
set "beginJS=mshta "javascript:close(new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write("
set "endJS=));""
for /f %%N in (
'%beginJS% \u0047etObject('winmgmts:').ExecQuery('Select * from Win32_PerfFormattedData_PerfOS_Memory').ItemIndex(0).AvailableBytes %endJS%'
) do set free_mem=%%N
echo free_mem=%free_mem%
endlocal
The above runs and returns the correct results in CMD and PowerShell, and TCC-RT 25;
Code:
e:\utils>"C:\Program Files\JPSoft\TCC_RT_25\tcc.exe" /q "E:\Utils\testhta.bat"
free_mem=130199814144
Version TCC-RT 25.00.27 x64
However, it does not return the correct results in TCC-RT 26;
Code:
e:\utils>"C:\Program Files\JPSoft\TCC_RT_26\tcc.exe" /q "E:\Utils\testhta.bat"
free_mem=
e:\utils>"C:\Program Files\JPSoft\TCC_RT_26\tcc.exe" /q "e:\utils\whatver.btm"
_x64: 1
_admin: 1
_elevated: 1
TCC-RT 26.01.35 x64 Windows 10 [Version 10.0.18362.720]
BuildNumber Caption CSDVersion OSArchitecture Version
18362 Microsoft Windows 10 Pro 64-bit 10.0.18362
Joe