Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 8 down vote accepted

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"
share|improve this answer
    
Works smoothly. Thank you. –  Radek Sep 25 '12 at 6:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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