Sign in to follow this  
Followers 0
aNewLyfe

Prevent Script From Kill

13 posts in this topic

#1 ·  Posted (edited)

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:

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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:

Share this post


Link to post
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

Share this post


Link to post
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.

 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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.

Share this post


Link to post
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:

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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:

Share this post


Link to post
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

Share this post


Link to post
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:

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

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

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