The error occurs when my WSO2 installation path contains space,WSO2 Carbon framework has problems handling file paths with spaces on Windows systems.
Solution
C:\tools\wso2am-4.5.0.23\
cmd /c 'dir /x "C:\Program Files"'
then you can run from current problématique path like so: C:\PROGRA~1\wso2is-5.11.0\bin> api-manager.bat