One week ago while trying to download from Android SDK in Windows 7 on my friend pc, i saw an error that it couldn’t download the files from Android Code repository. So search i on google and found a solution.
1. Write click on the Eclipse icon and click run as administrator and launch the SDK manager
2. Or You can follow the same thing for SDK manager directly
Later i found that if your software have some issues with writing data on computer try to follow the above method.
Same goes for your custom .bat or .cmd file.