0

I have a really annoying setup (which is out of my power), where I have a restricted user account, and an 'a' account, or an administrator account. Every time I run as admin (a lot), I have to put in the username and password, which slows me down quite a bit. I was wondering if it's possible to run a program as Admin from the command prompt while giving it the credentials (something like below):

runas /user:AdminAccount /password:fooBar program.exe

I know about the /savecred option, but I would need to put the password in for each new program...

UPDATE:

I just thought I should include this, the User I'm using as Admin isn't the inbuilt one, so runas only runs it as this user (without admin rights), so if there's a way to use this users admin rights, that'd be great

0

Sounds like CPAU might be what you are looking for:

http://www.joeware.net/freetools/tools/cpau/

"Command line tool for starting process in alternate security context. Basically this is a runas replacement. Also allows you to create job files and encode the id, password, and command line in a file so it can be used by normal users."

Should enable you to runas with the required admin account, and will store the password in an encrypted file. Only downside is you'd have to recreate the encrypted file(s) if your system enforces regular password expiration.

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.