Correction already.
runas /user:admin-pc\admin "cmd /c mkdir "C:\Program\IdleMiner""
*does* work.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm trying to write a batch script for Windows 7 that creates a new directory. It needs to run as admin. I'm trying this
runas /user:admin-pc\admin "mkdir "C:\Program Files\IdleMiner""
I also tried
runas /user:admin-pc\admin "cmd /c mkdir "C:\Program Files\IdleMiner""
This command:
runas /user:admin-pc\admin "cmd /c mkdir C:\Program\IdleMiner"
works fine. But
runas /user:admin-pc\admin "cmd /c mkdir "C:\Program\IdleMiner"
does not.
I'm not sure whether this is related to the space in the folder name or the permissions of that folder.
What's the right way to do this?
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Correction already.
runas /user:admin-pc\admin "cmd /c mkdir "C:\Program\IdleMiner""
*does* work.