Composer uses %APPDATA%\\Composer directory by default for global packages.
So I need to add %APPDATA%\\Composer\\vendor\\bin path to my user P
I found an answer in the source code: https://github.com/composer/composer/blob/master/src/Composer/Factory.php#L45
So environment variable COMPOSER_HOME must be defined as C:\php\composer.
Go to folder
(C:\Users(your user)\AppData\Roaming\Composer )
Then create new folder (vendor)
and
in vendor create (bin) and copy (C:\composer\composer.phar) to (bin) .
On Windows, when global install of a library / package is done, composer stores the package in a Composer directory inside windows **application data folders** which by default is C:\Users{user name}\AppData\Roaming`.
To change this folder to say C:\php\composer, create a COMPOSER_HOME environmental variable with the value set to C:\php\composer.
The steps below explain how environmental variables are added in Windows. * Press Windows Key + Pause Break then click Advanced system Settings
(source: w3guy.com)
Click the Environmental variables button.
(source: w3guy.com)
Under System variables, click New... button and add the environmental variable like so:
(source: w3guy.com)
You might want to restart your PC for this to take effect.
Credit: http://w3guy.com/change-composer-global-package-install-folder-windows/