How solve this problem (Critical Process)

Just starting out? Need help? Post your questions and find answers here.
soupetomate
New User
New User
Posts: 7
Joined: Wed Feb 04, 2015 8:47 pm

How solve this problem (Critical Process)

Post by soupetomate »

Hi i am making a software who can kill apps.
At the moment i have sucess listed all .EXE and kill .EXE i want.


But some EXE crash and do a BSOD when it's killed.

I have read over internet and i have see some examples.

http://www.codingvision.net/tips-and-tr ... -if-killed

The goal would be to code a little procedure, so i can disable protection of process then kill.

I have already my kill procedure working it's just about this.

Thanks
eJan
Enthusiast
Enthusiast
Posts: 365
Joined: Sun May 21, 2006 11:22 pm
Location: Sankt Veit am Flaum

Re: How solve this problem (Critical Process)

Post by eJan »

Edit: removed <.
Last edited by eJan on Fri Feb 06, 2015 11:47 pm, edited 1 time in total.
Image
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: How solve this problem (Critical Process)

Post by Josh »

Jooooooo, I like it. First post and want kill protected processes
sorry for my bad english
soupetomate
New User
New User
Posts: 7
Joined: Wed Feb 04, 2015 8:47 pm

Re: How solve this problem (Critical Process)

Post by soupetomate »

:/

I'm still suck at this to translate it right in PureBasic.
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: How solve this problem (Critical Process)

Post by Thorium »

Plain and simple: Dont do it!
Critical processes are critical for a reason and the bsod is there for a reason.
There is no reason to kill a critical process.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: How solve this problem (Critical Process)

Post by IdeasVacuum »

That is nothing that can't already be done using Task Manager, which is delivered as part of Windows. If you have a really good reason for building an app that does the same as Task Manager, tell us.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
normeus
Enthusiast
Enthusiast
Posts: 415
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: How solve this problem (Critical Process)

Post by normeus »

soupetomate might be creating a malware deleting program? Benefit of doubt.
I am just posting because I followed his link and I saw the picture of The new windows 8 BSD.
I only have seen this once and I didnt know what it was. I am not saying windows 8 is stable because I had to reinstall it 2 times when it wouldnt even boot. What I am saying is what a stupid looking BSD.
The time I saw it, I figured it was some freeware I was running and I decided the guy who created it was making fun of Mac's sad mac and opted on a sad frog because at that font size it looks like a frog.

@soupetomate
It is dificult when you compile a program and symantec right away decides it is a virus because you are using PureBasic. Thats why you'll get not help unless you state a clear motive for stopping running programs. No one wants PB compiled programs to be black listed.

Norm.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: How solve this problem (Critical Process)

Post by JHPJHP »

See: Services, Stuff, and Shellhook
- Stuff/MoreStuff/SetCriticalFlag.pb

---------------------------------------------------------------------------------

This script doesn't terminate a critical process it marks the current process as critical, causing a BSOD (Blue Screen of Death) when it ends.
- administrative privileges are required: Request Administrator mode for Windows Vista and above

soupetomate wants to accomplish the opposite of the BSOD script by removing the critical flag from a process so that it can be terminated safely:
soupetomate wrote:The goal would be to code a little procedure, so i can disable protection of process then kill.
---------------------------------------------------------------------------------

I rewrote the script to be a little more intuitive.
- tested on Windows 7 and Windows 8.1

If the script is executed with the current settings:
- warns you that the BSOD may occur if you proceed
- notifies you that the critical flag is present
- notifies you that the critical flag is not present
-- this will avoid the BSOD as the process is no longer marked as critical

Code: Select all

SetCriticalFlag(#Null, #True)
SetCriticalFlag(#Null, #False)
If the first parameter is #Null the script uses the current process, otherwise it expects a PID (process ID).

Second parameter options: #True, #False or Excluded (-1).
- #True: sets the critical flag
- #False: removes the critical flag
- Excluded (-1): checks if the critical flag is present

NB*: With the current settings, removing the second call to the Procedure: SetCriticalFlag will cause the BSOD to occur when the process ends.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: How solve this problem (Critical Process)

Post by blueznl »

Well, we're all suspicious people in here so let me ask a question: why would someone want to remove that flag? It's there for a reason...

... Then again, I have also some code that terminates other processes. For example in Unirun I sometimes kill an emulator which doesn't support a closewindow / endprocess message. But at least I can give a good reason :P
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply