How do Kill SYSTEM Process? - process

How do I kill SYSTEM process via cmd line tools?
I want to kill PHotkey.exe but not work any cmdline tools.
I tried apps and not working (access denied error);
Taskkill
PsKill

Related

Trying to shutdown computer remotely in vb.net

Helps master's, here is my coded when i try to shutdown remotely
Process.Start("shutdown", "-s -m \\COMPUTER NAME")
Then when i executed the program nothing happens..
I think my coded is not correct or i am missing something.
The shutdown command can fail for a number of reasons but you're not checking for success. Try this instead and then lookup the error.
Dim proc = Process.Start("shutdown", "/s /m \\COMPUTER_NAME")
proc.WaitForExit()
If proc.ExitCode <> 0 Then
MsgBox("Failed - Code = " & proc.ExitCode)
Else
MsgBox("Success")
End If
Note: you may need to run your application as an elevated process.
Before testing your application you should test that the command works from the command prompt.
Open cmd
Run shutdown /s /m \\COMPUTER_NAME
Check the output and make sure it worked. I suspect you'll get an access denied error. If so the right click on cmd and choose Launch as administrator. Then repeat this and make sure it works.
If this doesn't work then your program wont either. Google shutdown access denied and work through some of the trouble shooting tips.

Sysinternals psexec not running on the remote desktop

I've got two Remote Desktops hosted by a Hyper-V.
On Remote Desktop "A", I've got a .bat file, which I want to execute.
On Remote Desktop "B", I've got a cmd open with psexec cmd ready to invoke .bat file on machine "A".
"path-to\\psexec.exe" \\ip -u domain\username -p pswd -i cmd.exe /c "path-to\\myFile.bat %*"
The script contained in .bat file on machine "A" operates on the UI and thus requires a real screen to be open, so I am connected to two RDs simultaneously. However, when I call psexec command on machine "B", the cmd returns an error, but if I open RD "A" directly through the server's Hyper-V manager's interface, the psexec command works as expected.
Can someone explain please why this happens?
The UI of Windows runs on session 0. To run a program remotely that uses session 0, it will need to run as the System user (-s flag), and you can specify the session to use (-i flag). This answer has a few related tips too.

failed to kill a returning process

I have an invisible mspaint.exe process (no open window) that runs apparently at startup on WINDOWS XP.
I tried the usual ways to kill it, but none of them worked.
1) Task Manager: the process disappears but returns immediately.
2) Command Prompt: if I do
taskkill -f /im mspaint.exe
I receive the SUCCESS message BUT the process mspaint remains, with the same PID.
If I specify the PID number, then I also get the SUCCESS message but the process mspaint.exe remains with a new PID.
3) Process Explorer: the kill command has no effect.
There is a parent svchost.exe process that I killed but still I could not get rid of child process mspaint.exe
Any advice is welcome.
Try right-clicking on mspaint.exe in the processes tab in task manager and selecting "Kill Process Tree".
It seems like it could be a virus. I suggest downloading Malware Bytes (free) and doing a scan. http://www.malwarebytes.org

How to run a PHP script via SSH and keep it running after I quit

I'm trying to restart a custom IRC bot. I tried various commands :
load.php
daemon load.php
daemon load.php &&
But that makes the script execute inside the console (I see all the output) and when I quit the bot quits as well.
The bot author only taught me the IRC commands so I'm a bit lost.
You can install a package called screen. Then, run screen -dm php load.php and resume with screen -dR
This will allow you to run the script in the background, and still be able to use your current SSH terminal. You can also logout and the process will still be running.
Chances are good the shell is sending the HUP signal to all its running children when you log out to indicate that "the line has been hung up" (a plain old telephone system modem reference to a line being "hung up" when disconnected. You know, because you "hang" the handset on the hook...)
The HUP signal will ask all programs to die conveniently.
Try this:
nohup load.php &
The nohup asks for the next program executed to ignore the HUP signal. See signal(7) and the nohup(1) manpages for details. The & asks the shell to execute the program in the background.
Clay's answer of using screen(1) is pretty awesome, definitely look into screen(1) or tmux(1), but I don't think that they are necessary for this problem.
This line might help you
php load.php &

How stops webdev.webserver.exe

how can stops WebDev.WebServer.exe process without kill it??
I can do this:
taskkill /F /IM WebDev.WebServer.exe -works on Windows XP- but another solution without kill the proccess ???
Yeap, you are right, it will kill all process & ASP.NET service
The problem, actually, is how to kill WebDev.WebServer40.EXE, which was run with specified port.
f.e. I have:
WebDev.WebServer40.exe /port:10254 /path:"D:...\Web1"
WebDev.WebServer40.exe /port:10512 /path:"D:...\Web2"
and taskkill /F /IM WebDev.WebServer40.exe
will close all my sites, when I want only one of them
p.s. The Author means stop process == kill process, don't mind
Stopping a process is killing it.
Why do you need to "stop" the process without killing it? What do you mean by "stopping" the process?
You can use this tool to pause and resume processes.
Webdev.WebServer.exe is the development web server used by Visual Studio to allow quick debugging of ASP.NET applications.
Visual studio will stop it for you when it is not needed. What exact problem are you having that you want to stop it explicitly?