Message boards : GPUs : By FOLDERS, stop gpu auto with games
Message board moderation
Author | Message |
---|---|
Send message Joined: 23 Sep 17 Posts: 10 |
I have a computer with GPUGRID in BOINC and I also have many games. Every time I install a game, I have to add the game executable in the BOINC GPU exclusion list. Sometimes it is difficult to find the executable if it is a Steam game, since the link is of the steam://rungameid/359550 type and you have to open the Task Manager and then go to it. I have made a program that avoids having to add each game and does not need to put anything on the BOINC exclusion list. Just indicate the name of the folder where all the games are, the BOINC location and the nvidia-smi file (ONLY GPU NVIDIA). GPU_BOINC_Control_Programar.bat @echo off schtasks /CREATE /SC MINUTE /TN "GPU_BOINC_Control_Tarea" /TR "c:\path\GPU_BOINC_Control_Ocultar.vbs" GPU_BOINC_Control_Ocultar.vbs set objshell = createobject("wscript.shell") objshell.run "c:\path\GPU_BOINC_Control_Accion.bat",vbhide GPU_BOINC_Control_Accion.bat @echo off tasklist | find "boincmgr.exe">nul IF not "%ERRORLEVEL%"=="0" goto salir SET A=0 "C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" --format=csv,noheader --query-compute-apps=name | find "BOINC" IF "%ERRORLEVEL%"=="0" SET A=1 SET B=0 "C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" --format=csv,noheader --query-compute-apps=name | find "Games" IF "%ERRORLEVEL%"=="0" SET B=1 IF "%A%"=="1" IF "%B%"=="1" "D:\2 Programas instalados\BOINC\boinccmd.exe" --set_gpu_mode never IF "%A%"=="0" IF "%B%"=="0" "D:\2 Programas instalados\BOINC\boinccmd.exe" --set_gpu_mode auto :salir |
Send message Joined: 29 Aug 05 Posts: 15541 |
Which is fine and would work that way for Spanish versions and only if BOINC is installed in the default programs directory. Better is to figure out how to read the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Space Sciences Laboratory, U.C. Berkeley\BOINC Setup and look what the contents are for INSTALLDIR, then use that to point to boinccmd.exe For instance: FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Space Sciences Laboratory, U.C. Berkeley\BOINC Setup" /v INSTALLDIR') DO SET ID=%%Bwill read that from the registry and store it in ID The code above after delims= consists of a tab first and then a space. It requires both. If you need the data directory, use: FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Space Sciences Laboratory, U.C. Berkeley\BOINC Setup" /v DATADIR') DO SET DD=%%B |
Send message Joined: 23 Sep 17 Posts: 10 |
Thank you. It would look like this: GPU_BOINC_Control_Accion.bat @echo off tasklist | find "boincmgr.exe">nul IF not "%ERRORLEVEL%"=="0" goto salir SET A=0 "C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" --format=csv,noheader --query-compute-apps=name | find "BOINC" IF "%ERRORLEVEL%"=="0" SET A=1 SET B=0 rem Change GAMES by the games folder. It is not necessary to include the disk or routes. "C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" --format=csv,noheader --query-compute-apps=name | find "GAMES" IF "%ERRORLEVEL%"=="0" SET B=1 FOR /F "tokens=2*" %%F IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Space Sciences Laboratory, U.C. Berkeley\BOINC Setup" /v INSTALLDIR') DO SET ID=%%G IF "%A%"=="1" IF "%B%"=="1" "%ID%boinccmd.exe" --set_gpu_mode never IF "%A%"=="0" IF "%B%"=="0" "%ID%boinccmd.exe" --set_gpu_mode auto :salir |
Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.