Automate credentials entry when running elevated in Windows 10

0

I run a non-admin user account in Windows 10. Also, I have some administrator domain credentials I'm free to use. When Windows needs to run an app elevated, I get a prompt for user/password.

Is there any way to automate the credentials entry so that I just get a yes/no prompt?

Diego Pazos

Posted 2019-05-15T15:04:20.523

Reputation: 1

Answers

0

Theoretically you could store the admin credentials in a script (VERY UNWISE, DON'T DO THIS) that starts the program using them.

But no, there's not a way to do this that maintains correct security (not storing admin credentials in plain text, for instance). Think about it: If this was a simple thing to do, it would be done by virus and malware writers all over the place. Raising the level of an application's run state is a specific and intentional process on purpose and by design.

Here's another question asking about the same thing which has answers which come to the same conclusion, more or less: Is it possible to elevate the permission of a program in Windows without using "Run as Administrator"?

music2myear

Posted 2019-05-15T15:04:20.523

Reputation: 34 957

Of course I wouldn't want to store any credentials in plaintext. I meant some "legit" way to do it. ie, Windows storing them internally to be used when I require elevation. – Diego Pazos – 2019-05-16T17:18:18.023

Then my answer remains correct. There is not a secure way to store the credentials for one account in such a way that they are programmatically accessible in another account. – music2myear – 2019-05-16T17:31:46.190

They'd be only accessible in the account that stored them in the first place. AFAICT there's no security breach created. – Diego Pazos – 2019-05-16T18:04:28.003

But they'd be stored within an account that is used more broadly (regular user account) and for that reason has more restricted permissions. What you would be doing is, essentially, allowing processes normally restricted to the limited to the restricted scope of the regular user account a way to gain access to the much greater permissions of the administrator account. – music2myear – 2019-05-16T18:59:38.937