Zend certified PHP/Magento developer

Run bat file as administator != CMD as admin & execute line by line

I hope someone can help with this issue. SO Win10 x64.

I need to copy one XPI file (Firefox extension) to a Program Files (not x86) subfolder. If I do a simple bat file, and run it as administrator with right-click, mkdir works ok but the copy operation doesn’t work. Instead, if I open cmd as admin and run the copy operation from there, both mkdir and copy operation works as expected.

I’m need to call the BAT from a third-party software with elevated privileges, so if I can solve the first scenario, I should be able to solve my problem. Any help or explanation is much appreciated. Code is very simple:

mkdir "C:Program FilesMozilla Firefoxdistributionextensions"
copy file.xpi "C:Program FilesMozilla Firefoxdistributionextensions"

Thanks in advance.