Page 1 of 1

Run program without admin privilege in admin mode Everything

Posted: Sat Apr 08, 2017 9:14 am
by qaqz111
Can you please give a option to run programs from within result list as normal user even in admin mode Everything process?

Or just give an option that let user to define a custom command to run, there are many tools can do this, so that users can archive this by calling a custom tool program.

Re: Run program without admin privilege in admin mode Everything

Posted: Sat Apr 08, 2017 10:36 am
by therube
You should use the Everything Service to avoid running Everything "as Admin".

Re: Run program without admin privilege in admin mode Everything

Posted: Sun Apr 09, 2017 7:09 am
by qaqz111
The service seems having some problem, the monitoring can not reflect the changes of filesystem instantly.
I've encountered many times that the result list remains no change while filesystem changes(file created, deleted, etc.), even manually refresh(Press F5) can not make result list be updated.

Re: Run program without admin privilege in admin mode Everything

Posted: Sun Apr 09, 2017 3:20 pm
by horst.epp
qaqz111 wrote:The service seems having some problem, the monitoring can not reflect the changes of filesystem instantly.
I've encountered many times that the result list remains no change while filesystem changes(file created, deleted, etc.), even manually refresh(Press F5) can not make result list be updated.
The service is not resposible for updating the index, ist only for having the necessary rights.
So let the service running and alos start Everything with Windows start.
This way you will have the actual contents as fast as possible.

Re: Run program without admin privilege in admin mode Everything

Posted: Thu Sep 03, 2020 8:20 am
by cdull
I have found that solution for me.

I already have running a AutoHotkey script running as administrator (i start it automatically with windows task scheduler):

_______________

#if WinActive("ahk_exe Everything.exe") ; Everything is active
F7:: ; Hotkey

oldclipboard := ClipboardAll ; Save the (real) clipboard
sleep, 100
sendinput, ^+c
ClipWait, 1
sendinput, #r ; run file
WinWaitActive, ahk_class #32770, , 1 ; 1 second timeout
if ErrorLevel
{
return
}
else
{
sendinput, ^v{enter}
return
}
clipboard := oldclipboard ; Restore old (real) clipboard
return

_______________

The file will open from "run" without admin privileges.

Re: Run program without admin privilege in admin mode Everything

Posted: Thu Sep 03, 2020 8:27 am
by void
To customize how Everything executes an item:
  • In Everything, from the Tools menu, click Options.
  • Click the Context menu tab on the left.
  • Select Open (Files)
  • Change command from:
    $exec("%1")
  • to:
    $exec("myprogram.exe" "%1")
Does this work with your AutoHotKey script? hopefully this will eliminate the need to copy the item to the clipboard.

Re: Run program without admin privilege in admin mode Everything

Posted: Thu Sep 03, 2020 10:40 am
by cdull
No, this is not working. I have problems to open it form another AutoHotkey script. You need to do it with the "run" (Win+R)

But i have added a additional script to open it with doublclick instead of F7 as in the first script (i use both)

In the settings you wrote change:

In Everything, from the Tools menu, click Options.
Click the Context menu tab on the left.
Select Open (Files)
from:
$exec("%1")
to:
$exec(C:\Users\username\documents\everything_helper.ahk) ; insert your path of script

This is the code of everything_helper.ahk:

oldclipboard := ClipboardAll ; Save the (real) clipboard
sleep, 100
sendinput, ^+c
ClipWait, 1
sendinput, #r ;run file
WinWaitActive, ahk_class #32770, , 1 ; 1 second timeout
if ErrorLevel
{
msgbox, problem with everything_helper
return
}
else
{
sendinput, ^v{enter}
return
}

clipboard := oldclipboard ; Restore old (real) clipboard
ExitApp

Re: Run program without admin privilege in admin mode Everything

Posted: Thu Sep 03, 2020 4:05 pm
by NotNull
Another approach:
  • Download ADD_Unelevate.reg from this thread
  • Search for ADD_Unelevate.reg in your elevated (running as administrator) Everything
  • Double-click the reg-file and accept the dialogs
Now you can SHIFT-right-click your program, choose "Run as unelevated user" and there you go ..


Bonus:
  • Completely exit Everything: right-click the Everything icon in the system tray and choose Exit
  • Open your Everything.ini
  • Search for the line with "custom_verb01=" and change it to custom_verb01=UnElevate
  • Save Everything.ini
  • Satrt Everything again
  • Go to Menu:Tools > Options > General > Keyboard
  • In the Show commands containing box, enter verb
  • Change the keyboard shortcut of File | Custom verb 1 to F7 (global)
  • Press OK button
Now you can start a program unelevated with F7



BUT ...
I would advice you to NOT run Everything as administrator, bu as a regular user:
- Enable Everything Service
- Disable Run as administrator

Both settings can be found under Menu:Tools > Options > General