Run program as admin without entering credentials? (Automatic Win7 elevation)

3

1

I'm working on my systems without admin rights, but I'd like to start sysinternals process explorer as full admin to have some debug access on my machine.

Right now I run procexp.exe with parameter /e, which prompts me for admin credentials.

Of course I could use runas, but for this I would need to put my admin passwort in clear text in the corresponding batch file, which is something I don't like to do.

Is there a way to tell windows that this one procexp.exe is allowed to run as admin without needing to enter the credentials?
In Unix systems this is done using setuid (or setgid), but how can I achieve this functionality in windows?

Sam

Posted 2010-04-14T09:27:59.957

Reputation: 1 804

This sounds like a bad security policy to me. I hope Microsoft doesn't allow something like this. – surfasb – 2011-02-15T12:16:58.533

Every unix system allows something like this. There are ways to make this secure, and it is better than having to enter the password as plain text in a runas command. – Sam – 2011-02-16T09:59:53.840

1btw. on unix this feature is called "set uid on execution". – Sam – 2011-02-16T10:14:21.497

Answers

0

I found an answer on Stackoverflow, which works for me:

runas (at least on xp sp3) has option "/savecred" - it asks for password the first time and then it uses stored one (even after reboot).

You need to be aware that this is a security problem, though: after you ran /savecred once, every executable can execute itself with these saved credentials without any problems!!

Sam

Posted 2010-04-14T09:27:59.957

Reputation: 1 804

0

There is Encrypted RunAs from www.wingnutsoftware.com, which is not free but cheap. There is an alternative (free?) project called CPAU, but it seems basically abandoned.

Patrick Seymour

Posted 2010-04-14T09:27:59.957

Reputation: 7 662

Seems like it would be easier just to write your own 15 line long Java or C# program that would do this job nicely. – djangofan – 2011-09-28T21:45:32.300

I would agree with that if this was Stack Overflow, or if the OP had indicated they were a developer. Non-developers read this site also. – Patrick Seymour – 2011-09-29T01:14:58.610

-2

Right Click the Application shortcut -> Properties -> Compatibility and check "Run this program as an Administrator"

Hope this works and helps :)

Ranhiru Jude Cooray

Posted 2010-04-14T09:27:59.957

Reputation: 515

1It still asks for elevation, so no, it does not work. – Sam – 2011-02-16T10:01:02.637