For starters, I'm using ubuntu as that is what runs on the servers I use. I have not tried to build on Windows for some time (many many months) as it didn't work for me when I tried it. Much has changed since then.
That said, what errors do you get?
Cmd may be trying to write to C:\Program Files\SenchaCmd\Sencha\Cmd\repo
Do you have permission to write there?
I believe that I solved my problem by fixing the permissions there to allow writing.
A good test is to run:
sencha -sdk /path/to/extjs/sdk generate app MyAppName /path/to/MyAppDirName
sencha app build testing