Process Hacker and Windows discussion

 
User avatar
wj32
Founder
Posts: 948
OS: Windows
Location: Australia
Contact:

Command line reference

06 Feb 2011, 09:20

Process Hacker supports a limited number of command line options, listed below.

-settings filename

This option allows you to specify the location of Process Hacker's settings file. filename can be a relative path, in which case the current working directory at startup is used as the base.

Examples:
ProcessHacker.exe -settings settings.xml

-nosettings

Disables settings. Settings are set to their defaults at startup, and no settings are saved.

-noplugins

Disables plugins, even if the "Enable plugins" option is set.

-newinstance

Starts a new instance of Process Hacker, even if the "Allow only one instance" option is set.

-v

Forces Process Hacker's main window to be displayed at startup, even if the "Start hidden" option is enabled.

-hide

Hides Process Hacker's main window at startup, even if the "Start hidden" option is disabled.

-elevate

Prompts for elevation if Process Hacker is not started with elevated privileges.

-c -ctype objecttype -cobject object -caction action -cvalue value

Enables command mode. The status of the operation is returned in the exit status of the process.

Possible values of objecttype:
  • "process". object is the process ID, and action can be "terminate", "suspend", "resume", "priority", "iopriority" or "pagepriority".
  • "service". object is the service name, and action can be "start", "continue", "pause", "stop" or "delete".
  • "thread". object is the thread ID, and action can be "terminate", "suspend" or "resume".
Examples:

ProcessHacker.exe -c -ctype process -cobject 1424 -caction terminate
ProcessHacker.exe -c -ctype process -cobject 5896 -caction priority -cvalue high
ProcessHacker.exe -c -ctype service -cobject Winmgmt -caction pause

-s

Enables silent mode. No error messages are displayed for command mode, -installkph and -uninstallkph.

-ras

Enters run-as-service mode. This is used internally by the Run As command.

-nokph

Disables KProcessHacker. Process Hacker will not attempt to load the driver or connect to it.

-installkph

Installs KProcessHacker as a System Start service.

-uninstallkph

Deletes the KProcessHacker service.

-debug

Shows the debug console early in the startup process.

-showoptions -hwnd parentwindow -point x,y

Displays the Advanced tab of the options window only. parentwindow specifies the parent window handle in hexadecimal and x,y specifies the location of the options window.

-phsvc

Enters phsvc mode. This exposes a LPC-based API currently used by Process Hacker for tasks that require elevation.

-priority r|h|n|l

Sets the priority of Process Hacker to realtime (r), high (h), normal (n) or idle (l).

-selectpid pid

Selects pid in a new or existing instance of Process Hacker.

-sysinfo section

Opens the System Information window at startup, and optionally navigates to the specified section.
 
User avatar
OrdiFacil
New User
Posts: 2
OS: Windows XP SP3 x86
Location: Paris, France
Contact:

Command line reference - Feedback

17 Feb 2011, 08:50

:thumbup: Thanks! The "-hide" option is especially useful for peoples who want to start Process Hacker minimized at windows startup.
"We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare ; now, thanks to the Internet, we know that is not true." Robert Wilensky

"Give a man a fish and he will eat for a day. Teach a man to fish and he will eat for the rest of his life." Lao Tse
 
frank
Member
Posts: 6
OS: windows 7

Re: Command line reference

17 May 2014, 14:22

Sounds like a noob could do it! I will be giving it a try sometime! Wish me luck!
 
isabel

Re: Command line reference

05 Nov 2014, 00:34

:thumbup: :thumbup: :thumbup: very helpful
 
wschloss
New User
Posts: 1
OS: Windows 7 64 bit

Re: Command line reference

10 Nov 2014, 16:10

It would save time if there was a command line option to start directly in "System Information/CPU/One Graph per CPU" or other "System Information/view" modes. Thank you for this very nice tool.
 
shackles
Member
Posts: 16
OS: windows

Re: Command line reference

10 Dec 2016, 21:10

There are new command line actions? Like unloaddll and injectdll?
 
User avatar
dmex
Admin
Posts: 1285
Location: Australia

Re: Command line reference

11 Dec 2016, 01:52

wschloss wrote:
10 Nov 2014, 16:10
It would save time if there was a command line option to start directly in "System Information/CPU/One Graph per CPU" or other "System Information/view" modes. Thank you for this very nice tool.
There are plugins for this ;)
shackles wrote:
10 Dec 2016, 21:10
There are new command line actions? Like unloaddll and injectdll?
Those two options require user interaction and will not be available from the command line as they would likely become a target for malicious software.
 
shackles
Member
Posts: 16
OS: windows

Re: Command line reference

11 Dec 2016, 10:30

That's what I thought but when I was going through the source code I saw theses parameters so I asked.

Who is online

Users browsing this forum: No registered users and 1 guest