Run program without admin privilege in admin mode Everything

Have a suggestion for "Everything"? Please post it here.
Post Reply
qaqz111
Posts: 2
Joined: Sat Apr 08, 2017 8:58 am

Run program without admin privilege in admin mode Everything

Post by qaqz111 » Sat Apr 08, 2017 9:14 am

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.

therube
Posts: 2680
Joined: Thu Sep 03, 2009 6:48 pm

Re: Run program without admin privilege in admin mode Everything

Post by therube » Sat Apr 08, 2017 10:36 am

You should use the Everything Service to avoid running Everything "as Admin".

qaqz111
Posts: 2
Joined: Sat Apr 08, 2017 8:58 am

Re: Run program without admin privilege in admin mode Everything

Post by qaqz111 » Sun Apr 09, 2017 7:09 am

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.

horst.epp
Posts: 279
Joined: Fri Apr 04, 2014 3:24 pm

Re: Run program without admin privilege in admin mode Everything

Post by horst.epp » Sun Apr 09, 2017 3:20 pm

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.

cdull
Posts: 2
Joined: Thu Sep 03, 2020 8:13 am

Re: Run program without admin privilege in admin mode Everything

Post by cdull » Thu Sep 03, 2020 8:20 am

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.

void
Site Admin
Posts: 5654
Joined: Fri Oct 16, 2009 11:31 pm

Re: Run program without admin privilege in admin mode Everything

Post by void » Thu Sep 03, 2020 8:27 am

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.

cdull
Posts: 2
Joined: Thu Sep 03, 2020 8:13 am

Re: Run program without admin privilege in admin mode Everything

Post by cdull » Thu Sep 03, 2020 10:40 am

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

NotNull
Posts: 2286
Joined: Wed May 24, 2017 9:22 pm

Re: Run program without admin privilege in admin mode Everything

Post by NotNull » Thu Sep 03, 2020 4:05 pm

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

Post Reply