Jump to content

Check if someone runs a program?


Recommended Posts

Tip: Make her user account on your computer to a non-admin one, and viruses and the like wont be able to install them self.

Alternatively, do a so called 'Wrapper' kind of thing, that runs the program as a secure user(Guest account maybe, or Create a new non-admin account, and run it as such)

Viruses can do little harm when they have no access rights. ( I'm not referring to your sister here lol )

Link to comment
Share on other sites

#include <Array.au3>

Global $Programs = _ArrayCreate("firefox.exe", "messenger.exe", "bearshare.exe", "notepad.exe");Add programs here

Local $list = ProcessList();Grabs all running processes
For $i = 1 To $list[0][0] Step 1;Loops them all
    _KillProcess($list[$i][0]);Sends each to be check and if chosen, closed.
Next
$list = ProcessList();To get current amount of programs
Global $am = $list[0][0];Sets the amount
While 1
    Sleep(1000);To reduce load
    $list = ProcessList();Grabs all running processes
    If $am <> $list[0][0] Then;New Process
        For $i = 1 To $list[0][0] Step 1;Loops them all
            _KillProcess($list[$i][0]);Sends each to be check and if chosen, closed.
        Next
        $am = $list[0][0];Update amount
    EndIf    
WEnd

Func _KillProcess($id)
    For $i = 0 To UBound($Programs)-1 Step 1
        If $Programs[$i] = $id Then;If this program is not allowed to run
            ProcessClose($id);Close program
            MsgBox(1, "Closed", $id & " is not allowed to be used.");Display message.
        EndIf
    Next
EndFunc

Within the _ArrayCreate() put all your programs u wish to keep from running.

I like, I like, got one packed in there that stops specific sites from opening? lol...only thing with yours is, it doesnt start on startup :)
[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...