3

If I run

runas /savecred /user:yogurt\administrator "del c:\testt"

I get this error

Attempting to start del c:\testt as user "yogurt\administrator" ...
RUNAS ERROR: Unable to run - del c:\testt
2: The system cannot find the file specified.

But when I run

    runas /savecred /user:yogurt\administrator "cmd"

new dos window opens and then del c:\testt works just fine.

Any idea how to fix that on Windows7?

I want to delete a file that Administrator created. It works only if Administrator deletes it.

9

It thinks you're looking for a file named del as the command. Runas doesn't know that del is internal to cmd. Try

runas /savecred /user:yogurt\administrator "cmd /c del c:\testt"
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.