While deploying one of my package, the deployment failed even after 4 to 5 attempts of rechecking all the commands. Then I looked into one of the CCM logs and found that my package didn't even get downloaded properly because it contains a folder named "BIN" which will be filtered by IIS service.
The solution is,
1. Zipped my package.
2. Written a Vbscript to unzip the package before the installation starts and delete the zip file.
Zipping the package will be helpful in avoiding the long filename path error and if our media files contains any folder named "BIN".