Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Write opened this issue Sep 23, 2024 · 1 comment

Comments

@Write
Copy link

Write commented Sep 23, 2024

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 added a commit that referenced this issue Sep 23, 2024
…bat ~ not determining the Wizard's directory reliably.

modified:   SunshineIntegration.bat
@sofmeright sofmeright changed the title FR : Update SunshineIntegration.bat to use exe / log in current directory Issue: SunshineIntegration.bat ~ not determining the Wizard's directory reliably. Sep 23, 2024
@sofmeright sofmeright changed the title Issue: SunshineIntegration.bat ~ not determining the Wizard's directory reliably. Issue: SunshineIntegration.bat ~ not determining the Wizard's directory reliably Sep 23, 2024
@sofmeright
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants