Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 9 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .