sofmeright / VirtualDisplayDriver_Wizard

Virtual Display Driver: Wizard is a GUI tool that can integrate with other software such as Sunshine for efficient manipulation (Install / Uninstall / Reload / Configure) of Indirect Display Driver Sample (IddSample) implementations like the HDR capable Virtual Display Driver from itsmikethetech that works on Windows 10/11.
GNU General Public License v3.0
35 stars 3 forks source link

Issue: SunshineIntegration.bat ~ not determining the Wizard's directory reliably #4

Closed Write closed 2 months ago

Write commented 2 months ago

hi,

I had some trouble to use your tool as the SunshineIntegration.bat couldn't find the .exe that was in the same folder;

I solved it by using %~dp0

Example :

::@echo off
setlocal

:: Check if the correct number of arguments are provided
if "%~3"=="" (
    echo Usage: %0 [width] [height] [fps]
    exit /b 1
)

:: Assign arguments to variables
set WIDTH=%1
set HEIGHT=%2
set FPS=%3

:: Run the command from the current batch script directory
start "" /w "%~dp0PRPlanIT.com-VirtualDisplayDrv_Wiz.exe" Reso_Adds %WIDTH% %HEIGHT% %FPS%

:: Optionally pipe the output to a log file (if needed)
::"%~dp0PRPlanIT.com-VirtualDisplayDrv_Wiz.exe" Reso_Adds %WIDTH% %HEIGHT% %FPS% > "%~dp0output.log" 2>&1
sofmeright commented 2 months ago

Thank you for this PR and helping prevent other users from having the same problem. Much appreciated! I went ahead and updated the release with your fix so no one else will run into the same issue. I can not reproduce on my system, kind of curious why it gave you this trouble. Yet, referencing the paths by the app's directory is honestly best practice. I kind of just threw the .bat together, definitely an oversight. Sorry that you ran into that and I hope you did not spend much time troubleshooting it!