Process Hacker and Windows discussion

 
ccppuu
Member
Posts: 49

PA replacing with "-elevated"

Thu May 26, 2016 10:16 pm

When i select Process Hacker as default task manager (replacing the built-in task manager), do it is possible to start it with elevate privileges ("-elevated")?
 
User avatar
viksoftru
Member
Posts: 436
OS: Win7 (Live! DVD), BSD

Re: PA replacing with "-elevated"

Sat May 28, 2016 1:21 am

See topic Command line reference
-elevate

Prompts for elevation if Process Hacker is not started with elevated privileges.
 
ccppuu
Member
Posts: 49

Re: PA replacing with "-elevated"

Sat May 28, 2016 4:23 am

I know this, as I mentioned.
But the problem is how to add elevated privileges when I start PH not from the command line
Last edited by ccppuu on Sat May 28, 2016 8:50 am, edited 1 time in total.
 
User avatar
TETYYS
Plugin Developer
Posts: 466
OS: Win 7 x64

Re: PA replacing with "-elevated"

Sat May 28, 2016 8:46 am

You can run PH regularly with elevated privileges with Task Scheduler, however this is a security risk.

Create run.bat in PH folder:
@echo off
SCHTASKS /Run /TN "ProcessHackerElevate" /I
Create task in taskschd.msc:
https://i.imgur.com/cb3GLcF.png
https://i.imgur.com/zzabZiR.png
https://i.imgur.com/ex71EBh.png
https://i.imgur.com/DOF1vgq.png
https://i.imgur.com/gPRQEuI.png

Modify registry key:
https://i.imgur.com/HiZhAn4.png
 
User avatar
viksoftru
Member
Posts: 436
OS: Win7 (Live! DVD), BSD

Re: PA replacing with "-elevated"

Sat May 28, 2016 12:03 pm

Or run use latest version nnCron v1.93 b15 (15.02.2016) and add in to cron.tab for PH startup task command string -elevate or Run as user......
 
User avatar
TETYYS
Plugin Developer
Posts: 466
OS: Win 7 x64

Re: PA replacing with "-elevated"

Sun May 29, 2016 12:54 pm

Wouldn't it throw an UAC prompt?
 
User avatar
viksoftru
Member
Posts: 436
OS: Win7 (Live! DVD), BSD

Re: PA replacing with "-elevated"

Sun May 29, 2016 4:36 pm

If use nnCron run as service then UAC prompt not display then nnCron also can start any program as a service and run tasks as if they were started by specified user.
 
User avatar
TETYYS
Plugin Developer
Posts: 466
OS: Win 7 x64

Re: PA replacing with "-elevated"

Sun May 29, 2016 8:10 pm

well at this point you can just disable UAC all together
 
ccppuu
Member
Posts: 49

Re: PA replacing with "-elevated"

Mon May 30, 2016 10:48 am

UAC is already disabled.
 
User avatar
TETYYS
Plugin Developer
Posts: 466
OS: Win 7 x64

Re: PA replacing with "-elevated"

Mon May 30, 2016 1:15 pm

Then it should be elevated by default.
 
ccppuu
Member
Posts: 49

Re: PA replacing with "-elevated"

Mon May 30, 2016 3:35 pm

In Win10 It is elevated if i start from your folder or command line but not if i start from task bar or ctrl-alt-del
explorer.exe is Limited Elevation
ProcessHacker.exe is Limited Elevation
 
User avatar
TETYYS
Plugin Developer
Posts: 466
OS: Win 7 x64

Re: PA replacing with "-elevated"

Tue May 31, 2016 10:50 am

Did you try modifying the registry key to start PH with -elevated?
 
ccppuu
Member
Posts: 49

Re: PA replacing with "-elevated"

Tue May 31, 2016 3:50 pm

I not see registry key to add parameter to command.
The problem is in Win10, Win7 start elevated.
 
User avatar
viksoftru
Member
Posts: 436
OS: Win7 (Live! DVD), BSD

Re: PA replacing with "-elevated"

Tue May 31, 2016 11:55 pm

ccppuu

If option RunAsStarup == on then PH run use Registry key HKCU\Software\Microsoft\Windows\CurrentVersion\Run:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"Process Hacker 2"="\"C:\\Program Files\\Process Hacker 2\\ProcessHacker.exe\" -hide" <-- please, add -elevate up to end on command line:

"Process Hacker 2"="\"C:\\Program Files\\Process Hacker 2\\ProcessHacker.exe\" -hide -elevate"

, and if options Replase Task Manager == on then PH write HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe (used only if user pressed Ctrl+Alt+Dell buttons):

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe]
"Debugger"="\"C:\\Program Files\\Process Hacker 2\\ProcessHacker.exe\""

P.S.

Very, very high problem's download PH source, then open ./build/installer/Process_Hacker_installer.iss then read strings 245 - 249:
const
  installer_mutex = 'process_hacker2_setup_mutex';
  IFEO            = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe';
  HKCURUN         = 'Software\Microsoft\Windows\CurrentVersion\Run';
:lol:
 
ccppuu
Member
Posts: 49

Re: PA replacing with "-elevated"

Wed Jun 01, 2016 12:14 am

options Replace Task Manager in registry not work for me
 
qwerty12
Member
Posts: 13
OS: Windows 10 64-bit

Re: PA replacing with "-elevated"

Wed Jun 01, 2016 7:32 am

If you set Process Hacker as the default task manager either from its settings or the installer and then find a Process Hacker 2 shortcut and set it to run as an administrator from the Compatibility tab, starting PH by either pressing Ctrl+Shift+Esc or from the taskbar will elevate Process Hacker automatically (if your UAC settings are set to the highest, however, you will be prompted for confirmation, unlike with the default UAC level).
 
ccppuu
Member
Posts: 49

Re: PA replacing with "-elevated"

Wed Jun 01, 2016 2:13 pm

I set Process Hacker as the default task manager either its settings in portable version.
Starting PH by either pressing Ctrl+Shift+Esc it start in not elevated mode in Win10 and in elevated mode in Win7.
I not see any Process Hacker 2 shortcut.
In TaksManager see:
"C:\ProcessHacker\ProcessHacker.exe" taskmgr.exe /2
 
User avatar
viksoftru
Member
Posts: 436
OS: Win7 (Live! DVD), BSD

Re: PA replacing with "-elevated"

Wed Jun 01, 2016 3:51 pm

ccppuu

Please, read all topic answer!

P.S.

Your demonstrative reluctance to read others' responses is commendable, but your energy yes to peaceful purposes. :thumbdown:
 
ccppuu
Member
Posts: 49

Re: PA replacing with "-elevated"

Wed Jun 01, 2016 5:45 pm

it is obvious that I read all the answer and do not understand why you think the opposite.
 
User avatar
TETYYS
Plugin Developer
Posts: 466
OS: Win 7 x64

Re: PA replacing with "-elevated"

Wed Jun 01, 2016 7:20 pm

Because he posts through google translator and no one understands him and neither do he understands us

Who is online

Users browsing this forum: Yandex and 6 guests