Sign in to follow this  
Followers 0
oleg

Deny Termination

12 posts in this topic

Is anybody aware of way denying termination of an application or a service ?


There is a hex ( 31303030303030 ) reasons i love AutoIt !

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

I want to create a process / service that will monitor an application and will restart it if terminated ... So actually i want to disallow all users to terminate it .

The link you provided dosent drive me anywhere :o

Edited by oleg

There is a hex ( 31303030303030 ) reasons i love AutoIt !

Share this post


Link to post
Share on other sites

So is there no way ?


There is a hex ( 31303030303030 ) reasons i love AutoIt !

Share this post


Link to post
Share on other sites

I want to create a process / service that will monitor an application and will restart it if terminated ... So actually i want to disallow all users to terminate it .

The link you provided dosent drive me anywhere :o

Some of your questions seem so un-ethical at times...

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

What environment are you doing this in?

I used the RunAsSet to run the script at login (using command switches), that the current user could not kill because they where not admin.

Some of your questions seem so un-ethical at times...

@oleg

what exactly are you trying to do? why do you need to always have this program running?

Share this post


Link to post
Share on other sites

Thanks CyberSlug :o Even so its helps :geek:

But really guys isnt there a way to deny process termination , i dont care if it possible to kill the process with ntsd or other process management tools im sure only advanced users is aware of them but any average user wont .


There is a hex ( 31303030303030 ) reasons i love AutoIt !

Share this post


Link to post
Share on other sites

In my second post of this thread i gave you an idea on how to do it. look at the last post in that thread; it's by me. there's some VB script in there on how to hide the process.

Please answer me and SmOke_N's inquires about why you want to do this.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

In my second post of this thread i gave you an idea on how to do it. look at the last post in that thread; it's by me. there's some VB script in there on how to hide the process.

Please answer me and SmOke_N's inquires about why you want to do this.

Dude im not writing a virus or some other malicious software :o

This is as i stated above is done to montior client / server application that we run actually because the application itself is reall easy to terminate so im looking into many ways how to protect it from that ;) The application that i want to write will search for a certain exe and if its not running will restart it :sorcerer: But i dont want to have the monitoring application to be exposed see ?

The link you gave indeed have some interisting info but how this can be done in autoit ? :geek:

Dll call user32 GetWindow ?

Edited by oleg

There is a hex ( 31303030303030 ) reasons i love AutoIt !

Share this post


Link to post
Share on other sites

Thats the part I'm not sure about... but here is a simple example where it hides the close from a cmd window. I got this off the forums from somewhere, i forgot. This should get you started. I don't know how to do what your asking, so if you get it working let me know.

#include <GUIConstants.au3>
AutoItSetOption("WinTitleMatchMode", 4)
$SC_CLOSE = 0xF060
Run(@ComSpec)
WinWait(@ComSpec)

; Get the handle
$handle = WinGetHandle("classname=ConsoleWindowClass", "")
If @error Then
    MsgBox(4096, "Error", "Could not find the correct window")
Else
    $dSysMenu = DllCall("User32.dll", "hwnd", "GetSystemMenu", "hwnd", $handle, "int", 0)
    $hSysMenu = $dSysMenu[0]
    DllCall("User32.dll", "int", "RemoveMenu", "hwnd", $hSysMenu, "int", $SC_CLOSE, "int", 0)
    DllCall("User32.dll", "int", "DrawMenuBar", "hwnd", $handle)
EndIf

Good Luck!

Share this post


Link to post
Share on other sites

Thats the part I'm not sure about... but here is a simple example where it hides the close from a cmd window. I got this off the forums from somewhere, i forgot. This should get you started. I don't know how to do what your asking, so if you get it working let me know.

#include <GUIConstants.au3>
AutoItSetOption("WinTitleMatchMode", 4)
$SC_CLOSE = 0xF060
Run(@ComSpec)
WinWait(@ComSpec)

; Get the handle
$handle = WinGetHandle("classname=ConsoleWindowClass", "")
If @error Then
    MsgBox(4096, "Error", "Could not find the correct window")
Else
    $dSysMenu = DllCall("User32.dll", "hwnd", "GetSystemMenu", "hwnd", $handle, "int", 0)
    $hSysMenu = $dSysMenu[0]
    DllCall("User32.dll", "int", "RemoveMenu", "hwnd", $hSysMenu, "int", $SC_CLOSE, "int", 0)
    DllCall("User32.dll", "int", "DrawMenuBar", "hwnd", $handle)
EndIf

Good Luck!

Even if i wont figure it out CyberSlug method will do the job :o

Thanks guys :geek:


There is a hex ( 31303030303030 ) reasons i love AutoIt !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0