2

On my laptop running Windows 8.1, I want to invoke a mklink command as admin, How could I run runas in an ordinary command line session? I tried Runas /user:administrator "mklink /d c:\doc c:\users\•••"

It can not execute with neither my password or an empty password. Just as most home user, I haven't explicitly set up the password of the built in administrator.

I can open up a runas admin command prompt box, but it's very inconvenient. I wish I can do it as sudo. Thanks.


A solution I found through Powershell:

c:\> @powershell saps cmd -verb runas

start-process in its short form. However, another command prompt with separate environment variables must be forced and I can't directly embed my command "mklink ..." into this statement. It's still more convenient than finding out an icon with silly mouse clicks.

0 Answers0