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:
Group Policy - "Behavior of the elevation prompt for Administrators" - both
Prompt for Credentials
andElevate without Prompting
The upvoted answer here - Windows 10 pro, after anniversary update I can't use "runas administrator shortcut" anymore (
runas /profile /savecred /user:administrator "cmd.exe"
first, but with the current username instead ofadministrator
).
-
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.167Have you checked permissions for
regedit.exe
? – montonero – 2019-02-27T13:10:26.893Try to add the parameter
/netonly
to therunas
command. – harrymc – 2019-02-27T17:10:52.267Permissions 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 forHKEY_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'trunas ... regedit
– colmde – 2019-02-28T08:43:52.803