From dcb1f3351ef31fc8dc6017d7f022823b767a9f05 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 4 Jan 2025 13:25:53 +0530 Subject: [PATCH] Replace the use of wmic (deprecated) with a powershell call --- scripts/Developer Console.cmd | 3 ++- scripts/Start Stable Diffusion UI.cmd | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/Developer Console.cmd b/scripts/Developer Console.cmd index e60cf05b..49e6791d 100644 --- a/scripts/Developer Console.cmd +++ b/scripts/Developer Console.cmd @@ -4,7 +4,7 @@ echo "Opening Stable Diffusion UI - Developer Console.." & echo. cd /d %~dp0 -set PATH=C:\Windows\System32;%PATH% +set PATH=C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0;%PATH% @rem set legacy and new installer's PATH, if they exist if exist "installer" set PATH=%cd%\installer;%cd%\installer\Library\bin;%cd%\installer\Scripts;%cd%\installer\Library\usr\bin;%PATH% @@ -26,6 +26,7 @@ call conda --version echo. echo COMSPEC=%COMSPEC% echo. +powershell -Command "(Get-WmiObject Win32_VideoController | Select-Object Name, AdapterRAM, DriverDate, DriverVersion)" @rem activate the legacy environment (if present) and set PYTHONPATH if exist "installer_files\env" ( diff --git a/scripts/Start Stable Diffusion UI.cmd b/scripts/Start Stable Diffusion UI.cmd index 2bd54845..978c86d8 100644 --- a/scripts/Start Stable Diffusion UI.cmd +++ b/scripts/Start Stable Diffusion UI.cmd @@ -3,7 +3,7 @@ cd /d %~dp0 echo Install dir: %~dp0 -set PATH=C:\Windows\System32;%PATH% +set PATH=C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0;%PATH% set PYTHONHOME= if exist "on_sd_start.bat" ( @@ -39,7 +39,7 @@ call where conda call conda --version echo . echo COMSPEC=%COMSPEC% -wmic path win32_VideoController get name,AdapterRAM,DriverDate,DriverVersion +powershell -Command "(Get-WmiObject Win32_VideoController | Select-Object Name, AdapterRAM, DriverDate, DriverVersion)" @rem Download the rest of the installer and UI call scripts\on_env_start.bat