Windows7: Gaining administrator rights in CLI without being prompted for password

Posted by liori on Super User See other posts from Super User or by liori
Published on 2010-06-28T20:30:32Z Indexed on 2011/02/05 15:28 UTC
Read the original article Hit count: 212

Filed under:
|

Hello,

I am trying to write a script which includes disk defragmentation as one of its steps. defrag needs administrative rights to work. I tried to use runas /user:Administrator, but it always asked me for password (even though there isn't one set).

The script needs to run unattended for a long time, and it needs to be started from standard user account (it is actually being run by cygwin), so I'd like to get rid of that prompt. Is this possible?

Thanks,

© Super User or respective owner

Related posts about windows-7

Related posts about user-accounts