Process Hacker and Windows discussion

 
MPeti1
Member
Posts: 3
OS: Windows 10 64 bit
Location: Hungary

startup as elevated process?

15 Apr 2017, 15:24

It would be good if i would have an option to start Process Hacker always elevated. I know, i can set it in task scheduler, but it would be more comfortable if i could set it from Process Hacker.
 
User avatar
viksoftru
Member
Posts: 471
OS: Win7 (Live! DVD), BSD

Re: startup as elevated process?

16 Apr 2017, 04:21

 
User avatar
TETYYS
Plugin Developer
Posts: 471
OS: Win 7 x64

Re: startup as elevated process?

17 Apr 2017, 18:57

viksoftru wrote:
16 Apr 2017, 04:21
this is not what he asked for.

currently process hacker has no such "feature".
 
Hewbie

Re: startup as elevated process?

16 Jun 2017, 21:43

There is no need to, you can do that yourself in Windows (7 and above):

1. Make a link to PH2, put on desktop.
2. Right-click Link-icon. Select "Properties", select 2nd tab, click "Advanced", tick "Run as administrator", click "OK", then click "Apply".
3. Right-click Link-icon again select: "Add to startmenu" or "Add to taskbar" or both alternatively (whatever suits you)
4. Remove desktop-link if not needed there (again whatever suits you)

Now clicking on either three starts PH2 in elevated mode. Problem solved!
(As you might have guessed, this method works not exclusively for PH2, so it might come in handy for other programs too...)

All the best, Hewbie.

And to you developers: keep up the good work with Process Hacker. I am about to leave Process Explorer for it. Great job!
 
User avatar
TETYYS
Plugin Developer
Posts: 471
OS: Win 7 x64

Re: startup as elevated process?

18 Jun 2017, 13:24

not when pressing ctrl+shift+esc
 
User avatar
dmex
Admin
Posts: 1285
Location: Australia

Re: startup as elevated process?

27 Jul 2017, 03:59

Sorry, auto-elevation bypasses defined security boundaries on Windows and we can't do that. You can however configure Windows to auto-elevate specific applications yourself.

I've created these bat scripts that create the elevation task and a desktop shortcut... You should definitely change every "ProcessHacker_RunElevatedTask" string in the below files to a custom string for extra security.

These scripts only work if you have installed the nightly builds of Process Hacker into the default installation directory... If you're not using a nightly build or have used a custom install directory then you will need to edit the scripts and update the strings.

1) Download these files (You need both scripts for this to work otherwise you create an elevation task without being able to launch it)
create_task.bat
(283 Bytes) Downloaded 64 times
create_shortcut.bat
(761 Bytes) Downloaded 62 times
2) Right-click "create_task.bat" and select "Run as Administrator"... If the script succeeds then Process Hacker will run with administrative privileges just once.

3) Run "create_shortcut.bat" to create a desktop shortcut... By default it's configured to launch Process Hacker elevated when you press CTRL+SHIFT+A but you can change that by right-clicking the shortcut and changing the properties.

You only need to run these scripts once and afterwards you only need to use the desktop shortcut (or the hotkey) to launch Process Hacker elevated by default.
 
User avatar
diversenok
Member
Posts: 27
OS: Windows 7 x64
Location: Source Code
Contact:

Re: startup as elevated process?

05 Aug 2017, 21:06

I think I have better solution for this problem. It uses the same mechanism as Process Hacker uses to replace Task manager.

Here is a program: Execution Master (page on GitHub). It allows you to configure program launch using several standard actions including confirmation, request for elevation, and dropping admin rights.
Works fine on Windows 7, 8 and 10. I wrote it. ;)

Just set Elevate action for ProcessHacker.exe and enjoy.
Last edited by diversenok on 17 Aug 2017, 09:35, edited 1 time in total.
 
User avatar
viksoftru
Member
Posts: 471
OS: Win7 (Live! DVD), BSD

Re: startup as elevated process?

06 Aug 2017, 15:23

Thank you! Useful for running bats requiring Elevation and then somehow there is no desire to fence his garden. :)
 
User avatar
diversenok
Member
Posts: 27
OS: Windows 7 x64
Location: Source Code
Contact:

Re: startup as elevated process?

06 Aug 2017, 16:03

Wait a second... It shouldn't work on bats because they are not real executables. I mean interception of launching wouldn't work. You still can use Elevate.exe from the kit to launch bat files but it's not much better then using context menu... Only if you do it from cmd... :thinking:

Hold on, I know how to solve this problem. I'll be back soon.
 
User avatar
viksoftru
Member
Posts: 471
OS: Win7 (Live! DVD), BSD

Re: startup as elevated process?

06 Aug 2017, 17:40

I find small binary tools Sudo v1.1.0.50 © MVV, 2010 - 2013 (x86 + x64, 2392 byte Zip). For test purposes, this is more than enough, but I'll try your hand at the occasion.
 
User avatar
diversenok
Member
Posts: 27
OS: Windows 7 x64
Location: Source Code
Contact:

Re: startup as elevated process?

17 Aug 2017, 09:50

So... My idea failed. If you type bat file inside cmd.exe:
C:\> test.bat
there is no way to easily intercept it's execution (interpretation) by cmd. In that case only
C:\> sudo test.bat
will help. But you still can create new file extension, associate it with sudo, and rename all bats that require elevation by setting them this new extension. It will help with all other situations.
 
User avatar
viksoftru
Member
Posts: 471
OS: Win7 (Live! DVD), BSD

Re: startup as elevated process?

17 Aug 2017, 12:30

or use script like elevation.cmd :
@echo off
@start /i /d"%~dp0" sudo %1
whats parameter %1 is needed bath file. Usage:

elevation test.cmd

Who is online

Users browsing this forum: Bing, Majestic-12 [Bot] and 2 guests