1. Find Composer Installation Path
Run the following command to check system paths:
php -r "echo getenv('PATH');"
Look for a path similar to:
C:\ProgramData\ComposerSetup\bin\
Or search for "composer" in the output.
2. Run Composer Using a Specific PHP Version
Once you find the correct path, run:
C:\php83\php.exe C:\ProgramData\ComposerSetup\bin\composer.phar install
Replace C:\php83\php.exe
with your desired PHP version path.