Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Saturday, February 4, 2017 2:23 AM | 1 vote
Reference this thread(which is closed without resolution) for details: https://social.technet.microsoft.com/Forums/en-US/57904c36-7422-47b9-bbf0-ee46f6462919/run-settings-as-administrator?forum=WinPreview2014General
I'm looking for 'sudo' command in windows.
(FYI: sudo existed for some 50 years, but Windows still can't replicate it)
Thanks.
All replies (6)
Saturday, February 4, 2017 5:27 AM
I'm looking for 'sudo' command in windows.
That's psexec.exe but ms-settings:// is modern. In fact, I'm not sure whether you can even open it when explorer.exe is elevated. For example, I seem to recall having trouble using modern apps when booting in safe mode.
Heh. Just for grins I killed explorer and then restarted it with psexec -h explorer.exe. Result explorer.exe /NOUACCHECK is running (that's new to me) but Elevated No. And trying to start explorer.exe ms-settings:// elevated just gets "The wait operation timed out." QED.
Robert Aldwinckle
Monday, February 6, 2017 6:50 AM
There is no “sudo” command in Windows. The nearest equivalent is "run as administrator."
You can do this using the Runas command with an administrator trust-level, or by right-clicking the program in the UI and choosing "run as administrator."
Runas
https://technet.microsoft.com/en-us/library/bb490994.aspx?f=255&MSPPError=-2147217396
There is a good case talks about this topic, have a look.
http://superuser.com/questions/42537/is-there-any-sudo-command-for-windows
Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
Regards
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Tuesday, February 7, 2017 3:57 PM | 1 vote
Teemo,
You missed the point that runas cannot be used with the Settings app.
Try it and you'll see.
Wednesday, February 8, 2017 8:31 AM
Yes, you are right, we do can't use runas command on Settings app, it's by design, but it is the only way to run a program as admin.
For Settings app, it is based on current login account originally, we can't change this point, the reference case you mentioned has explained it, I agree with Michael Shao's opinion.
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Wednesday, February 8, 2017 3:19 PM | 1 vote
Teemo,
Which part of Michael Shao's opinion do you agree with?
This: " the issue here might be considered as a feature request" ?
I understand that it's by design, I just believe that the design is bad. That's why I mentioned 'sudo' from *nix world, that has been designed 50 years ago, and perhaps MSFT can draw inspiration for its feature requests from some 50 year old designs.
Thursday, February 16, 2017 9:31 AM
Ok, I understand your feeling.
Users' demand is the source of the product to make progress, I have feedback your idea to my leader, and system developer also pay attention to the forum.
Maybe Setting apps will be changed in future, but now, we need to accept and adapt it.
Regards
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].