How to runas an application requiring elevation with a different user?

0

I want to run regedit as a different user (i.e. to edit that user's registry entries).

So I've run cmd as an Administrator, then did

runas /profile /savecred /user:OtherUserName regedit

It asks for my password but after I type it in, I get

RUNAS ERROR: Unable to run - regedit

740: The requested operation requires elevation.

I understand that regedit has to be run as an administrator, but I am running the command prompt as administrator. OtherUserName is an Administrator type user.

I'm guessing that even though I'm running for the current user as administrator, my acceptance of that doesn't pass over to OtherUserName.

But this is something I am able to do in Windows 7 Embedded.

I've tried:

colmde

Posted 2019-02-27T11:42:48.747

Reputation: 163

If you want to edit the users registry just check HKEY_Users or manually open the hive for the user. – Seth – 2019-02-27T12:41:10.167

Have you checked permissions for regedit.exe? – montonero – 2019-02-27T13:10:26.893

Try to add the parameter /netonly to the runas command. – harrymc – 2019-02-27T17:10:52.267

Permissions for regedit.exe are fine, if I log in as OtherUserName I can run it fine. (They are also an administrator user). Tried /netonly but didn't work. As for HKEY_Users I need to put this into a .bat file / .reg file so that wouldn't be easy but I think I've managed to find a way around it - though I'm still puzzled why I can't runas ... regedit – colmde – 2019-02-28T08:43:52.803

Answers

0

OK so I believe I've found a way around it, thanks to this page... https://www.itechtics.com/edit-registry-settings-other-users/

reg load HKU\OtherUserName C:\Users\OtherUserName \ntuser.dat

then

regedit

then there is a node

[HKEY_USERS\OtherUserName\...etc.]

in the registry settings.

It solves the problem for me, though it still doesn't answer the overall question of why I can't runas an application requiring elevated permissions...

colmde

Posted 2019-02-27T11:42:48.747

Reputation: 163

0

Have you considered opening the file location itself, finding the "regedit" application. Then shift + right click, run as different user.

user944413

Posted 2019-02-27T11:42:48.747

Reputation: