RunWithoutElevation

Plug-in and third party software discussion.
Post Reply
wvxwxvw
Posts: 2
Joined: Sun Dec 22, 2019 11:04 am

RunWithoutElevation

Post by wvxwxvw »

There is such a utility from nirsoft - https://anonfile.com/1cWf22Hen0/RunWith ... ion.1.0_7z
It exist for a short time separately, and is now built into NirLauncher. The point of it is to run programs that require elevation of rights, with the rights of a normal user. But it can be used in another way. For example, to run other programs with normal user rights from a program running as an administrator.

The mode of operation "Everything" as administrator for many is more preferable than the service, but the fact that all of will be run also as administrator forces users to abandon this mode in favor of a less convenient service mode.

It would not be bad to embed in "Everything" this gasket "RunWithoutElevation" or write your own. So that even in administrator mode you can run all from the program with normal rights.

----
Если я накосячил в изложении своей мысли по английски просьба перевести это более правильно!
Есть такая утилита от nirsoft - https://anonfile.com/1cWf22Hen0/RunWith ... ion.1.0_7z
Она совсем недолго сыществовала отдельно, а сейчас встроена в NirLauncher. Смысл ее в том, чтобы запускать программы, требующие повышения прав, с правами обычного пользователя. Но ее можно использовать и по другому. Например, для запуска других программ с правами обычного пользователя из программы запущенной от имени администратора.

Режим работы "Everything" от имени администратора для многих более предпочтителен чем служба, но то что все из него будет запускатьсь также от имени администратора заставляет пользователей отказаться от этого режима в пользу менее удобного режима службы.

Было бы не плохо встроить в "Everything" эту прокладку "RunWithoutElevation" или написать свою. Чтобы даже в режиме администратора можно было запускать все из программы с обычными правами.
therube
Posts: 4580
Joined: Thu Sep 03, 2009 6:48 pm

Re: RunWithoutElevation

Post by therube »

The mode of operation "Everything" as administrator for many is more preferable than the service
Why?
NotNull
Posts: 5167
Joined: Wed May 24, 2017 9:22 pm

Re: RunWithoutElevation

Post by NotNull »

Official source for RunWithoutElevation: https://www.nirsoft.net/utils/run_witho ... ation.html
(although the vague link *currently* contains the same; I did a bitwise comparison).


You can do what you want already in Everything. Will describe it later (or someone else might do it).
But first, I have the same question as @therube: "Why?"




(My personal opinion: This "run as administrator" option should be hidden in a very dark corner or even be removed completely)
horst.epp
Posts: 1332
Joined: Fri Apr 04, 2014 3:24 pm

Re: RunWithoutElevation

Post by horst.epp »

As NotNull already said, the official source of RunWithoutElevation
is https://www.nirsoft.net/utils/run_witho ... ation.html
And the question, why is Everything as administrator more preferable than the service ?
I also agree that the "Run as administrator" option should be removed completely
NotNull
Posts: 5167
Joined: Wed May 24, 2017 9:22 pm

Re: RunWithoutElevation

Post by NotNull »

horst.epp wrote: Sun Dec 22, 2019 1:40 pm I also agree that the "Run as administrator" option should be removed completely
:thumbsup:

On the other hand ... this forum might go quiet. A large part of the reported issues are related to people running Everything as administrator (it is in the top 2 of issues)...
Maybe then we should discuss .. Everything else ...
(Why isn't the Off-topic discussion subforum called "Everything Else"? :D )
wvxwxvw
Posts: 2
Joined: Sun Dec 22, 2019 11:04 am

Re: RunWithoutElevation

Post by wvxwxvw »

Why?
I for some reason thought that in service mode the program sees less on a system disk. Now I understand that was wrong. But the description, of how from the program started from the administrator to run all as a simple user, I would read.

I have a program running as a service, by the way. So I'm not one of those... :D
NotNull
Posts: 5167
Joined: Wed May 24, 2017 9:22 pm

Re: RunWithoutElevation

Post by NotNull »

I took a quick look at the documentation of RunWithoutElevation.
If it works as described (set an environment variable that forces the next program to be started "As Invoker" in compatibility mode), you should NOT be able to step down to a non-elevated account.
(AsInvoker forces a program to be started with the credentials that were active at that time)

But I did not test this.. If it actually *does* give a possibility to "un-elevate", please let me know!
(
Easiest test: try to start CMD.exe unelevated this way and enter command WHOAMI /GROUPS.
If you find Mandatory Label\High Mandatory Level in the list, you are still elevated.
Or check TaskManager and add the Elevated column to the result list
)


Back to the original question:
wvxwxvw wrote: Sun Dec 22, 2019 11:37 am It would not be bad to embed in "Everything" this gasket "RunWithoutElevation" or write your own. So that even in administrator mode you can run all from the program with normal rights.
Installation
  • Extract attached Unelevate.zip somewhere
  • Start an elevated shell (CMD / PowerShell / ..)
  • Import ADD_Unelevate.reg
How to use
From now on, when you are in an elevated program (might be Everything, might be a third party filemanager, might even be the Open File dialog of Notepad), you can SHIFT-rightclick a program and choose "Run as unelevated user" to run that program unelevated.
You can use this option on files too: if there is a program associated with it - like Notepad for txt files - you can SHIFT-rightlick this txt file to open this file in an unelevated Notepad.

Uninstall
  • Start an elevated shell (CMD / PowerShell / ..)
  • Import REMOVE_Unelevate.reg
Notes
Only tested on Win10
Icon is just an example; choose an icon you like.
Attachments
Unelevate.zip
(875 Bytes) Downloaded 883 times
harryray2
Posts: 1049
Joined: Sat Oct 15, 2016 9:56 am

Re: RunWithoutElevation

Post by harryray2 »

Do you, by any chance, have something that will run a file in a cmd line shell as elevated? At the moment I have to open an elevated cmd box then type in or copy and pate the full path into the box.

Thanks.
Post Reply