replace WMIC with powershell

This commit is contained in:
deffcolony
2025-05-06 20:24:03 +02:00
parent 8d3c46e0e0
commit e93ed7c584
12 changed files with 96 additions and 82 deletions

View File

@@ -14,8 +14,9 @@ echo 0. Cancel
setlocal enabledelayedexpansion
chcp 65001 > nul
REM Get GPU information
for /f "skip=1 delims=" %%i in ('wmic path win32_videocontroller get caption') do (
set "gpu_info=!gpu_info! %%i"
set "gpu_info="
for /f "tokens=*" %%i in ('powershell -Command "Get-CimInstance Win32_VideoController | Select-Object -ExpandProperty Name -First 1"') do (
set "gpu_info=%%i"
)
echo.