Jump to content

Prevent Script From Kill


Recommended Posts

ill try to explain this simple,

i wrote a very usefull script his name is "MyFirstScript" xD, im using it, im very happy, i love autoit

but here goes second script xD. its including just a line of code ;

ProcessClose("MyFirstScript.exe")

Unfortunately, my first script closing.

is there anyway to block this ?

i searched too much but there s no information for this issue.

im waiting for your helps, thanks for ur relation

Edited by mistakilla

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Link to comment
Share on other sites

ProcessClose does exactly what you are trying to prevent...

If you don't want to close MyFirstScript.exe, then don't ProcessClose it :rolleyes:

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

  • Moderators

ill try to explain this simple,

i wrote a very usefull script his name is "MyFirstScript" xD, im using it, im very happy, i love autoit

but here goes second script xD. its including just a line of code ;

ProcessClose("MyFirstScript.exe")

Unfortunately, my first script closing.

is there anyway to block this ?

i searched too much but there s no information for this issue.

im waiting for your helps, thanks for ur relation

Wouldn't you think that if you told it to close the process (the first we are left to assume is named MyFirstScript.exe) that it's actually going to close that process?

If you only want to run 1 instance, then look at _SingleTon() in the help file, this you will put at the top of the script.

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.

Link to comment
Share on other sites

Wouldn't you think that if you told it to close the process (the first we are left to assume is named MyFirstScript.exe) that it's actually going to close that process?

If you only want to run 1 instance, then look at _SingleTon() in the help file, this you will put at the top of the script.

sorry for my bad english but, smoke thats not what i want to do (or explain). im writing a pc lock script and i want to block kill attempts to my script, that comes from other scripts.

im asking for anything like mmmm

access denied.

for example im trying to kill KAV or AVP or PANDA or Xtrap or Hackshield or any System Process and it says cant do this access denied.

that is the what iam asking for

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Link to comment
Share on other sites

sorry for my bad english but, smoke thats not what i want to do (or explain). im writing a pc lock script and i want to block kill attempts to my script, that comes from other scripts.

im asking for anything like mmmm

access denied.

for example im trying to kill KAV or AVP or PANDA or Xtrap or Hackshield or any System Process and it says cant do this access denied.

that is the what iam asking for

If the script was started as an Admin, non-admins should not be able to kill it. Assuming windows "Pro" version, not 95/98, etc.

If you're not an Admin, then I hope you never figure out how to do that.

:rolleyes:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

sorry for my bad english but, smoke thats not what i want to do (or explain). im writing a pc lock script and i want to block kill attempts to my script, that comes from other scripts.

im asking for anything like mmmm

access denied.

for example im trying to kill KAV or AVP or PANDA or Xtrap or Hackshield or any System Process and it says cant do this access denied.

that is the what iam asking for

There are a few programs that allow windows to set it as such as you asked for. Autoit itself does not allow that, nor do that itself... The reason for this, someone can use that type of idea to write etiher a virus or something to that effect of bad behavior. So please don't expect it to be developed any time soon during this time line, with autoit.
Link to comment
Share on other sites

ProcessClose("MyFirstScript.exe")

Unfortunately, my first script closing.

well ProcessClose closes script......or that or I am pickle. :rolleyes: Edited by i542

I can do signature me.

Link to comment
Share on other sites

There are a few programs that allow windows to set it as such as you asked for. Autoit itself does not allow that, nor do that itself... The reason for this, someone can use that type of idea to write etiher a virus or something to that effect of bad behavior. So please don't expect it to be developed any time soon during this time line, with autoit.

ok i understand thanks.. so it looks, there is no way to do that.

well ProcessClose closes script......or that or I am pickle. :rolleyes:

please read entire topic :rambo:

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Link to comment
Share on other sites

If the script was started as an Admin, non-admins should not be able to kill it. Assuming windows "Pro" version, not 95/98, etc.

If you're not an Admin, then I hope you never figure out how to do that.

:rolleyes:

thanks for reply. it sounds good.

i think u mean primary system administrator (think that be formed when u installing winxp)

so can u please teach me; how can i launch an autoit script with that when i not logged on that ?

Edited by mistakilla

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Link to comment
Share on other sites

thanks for reply. it sounds good.

i think u mean primary system administrator (think that be formed when u installing winxp)

so can u please teach me; how can i launch an autoit script with that when i not logged on that ?

If $CMDLINE [0] > 0 and $CMDLINE [1] = "RunAs" Then
    
;this is where the main script is ran
    
    Msgbox(0,"","This is the script ran as the user specified")

Else
    If NOT @compiled then Exit
    $userName = "User"
    $Password = "Password"
    RunAsSet ($userName,@Computername,$Password)
    Run(@ScriptFullPath  & " RunAs", @ScriptDir)
    Exit
EndIf

There is also a script to help Keep a program running in my signature below

Link to comment
Share on other sites

If $CMDLINE [0] > 0 and $CMDLINE [1] = "RunAs" Then
    
;this is where the main script is ran
    
    Msgbox(0,"","This is the script ran as the user specified")

Else
    If NOT @compiled then Exit
    $userName = "User"
    $Password = "Password"
    RunAsSet ($userName,@Computername,$Password)
    Run(@ScriptFullPath  & " RunAs", @ScriptDir)
    Exit
EndIf

There is also a script to help Keep a program running in my signature below

Thanks ChrisL i tried ur script, thats not what i want but i like it, pretty good,smart idea, i ll use it

thank u

also thanks for other thing too.

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Link to comment
Share on other sites

It would most likely require a dll, and a global system hook on some kernel32 function.

If the solution to blocking access to process shutdowns were ever posted on this forum, I would hope that it would be deleted immediately and the poster banned. This subject will be used for the negative side of the community more than the positive I am certain.

What if an administrator decides to make a script that would prevent access to something then? Then a script that can circumvent itself to be shut down is required.

Sure you can make an restarter/monitor script, but that does not prevent any loss of data that the script might be using.

Edited by FreeFry
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...