Composer Failed to open stream: Permission denied.

I recently reformatted my Ubuntu External HDD back to Windows because of WLAN Driver reasons.

But now everytime I am trying to setup Composer/Yii Advanced with this command:

composer global require "fxp/composer-asset-plugin:~1.1.1"

I get:

file_put_contents(C:\ProgramData\ComposerSetup\bin): failed to open stream: Permission denied

I already changed the folder permissions. I unchecked "Read-Only".

Note: I’m running Windows 10 To Go.

EDIT: nvm i got it to work by removing the Composer enviroment variables.

bump

Bump for something that you solved?

Having same issue on Windows 7.
file_put_contents … Failed to open stream:permission denied.
Unable to install / update any of packages