The following below steps to install composer in Windows 10/11
Step [1] – Download Composer

Step [2] – Click on Download composer folder
Click on Install for all users(recommended)

Step [3] – Click om Developer Mode–>Next Button

Step [4] – Directory auto selected C Folder by default, if you would like to modify composer installation in other folder as per need –> Next Button

Step [5] – Here we need to set path for xampp folder as
E:\xampp\php\php.exe
Click on Next Button

Step [6] – Finally Composer has been installed.

Step [7] – Finally run below command to check either Composer working fine or not.
