Jump to content

How to "kill" a program?


PantZ4
 Share

Recommended Posts

I try to kill the setup program before the install is complet but it doesn't seems to work...

If _Singleton("Install.exe",1) = 0 Then Exit

WinKill("Setup.exe", "")
MsgBox(64,"The install will now begin")
; blablabal

I try also Opt("WinTextMatchMode", 2), but no luck...

Thank you :P

Link to comment
Share on other sites

  • Developers

I try to kill the setup program before the install is complet but it doesn't seems to work...

If _Singleton("Install.exe",1) = 0 Then Exit

WinKill("Setup.exe", "")
MsgBox(64,"The install will now begin")
; blablabal

I try also Opt("WinTextMatchMode", 2), but no luck...

Thank you :P

ProcessClose() ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Nope... It just wont die...

There could be a 2nd or even a 3rd program that is reopening the first program. For example, if program "b" detects that program "a" has been closed, it reopening it and if program "a" detects that program "b" is close, it reopens it. So you have to close both programs at the same time. I have seen this problem before with ad ware and spy ware.

.

Link to comment
Share on other sites

  • 1 month later...

I've seen this as well. When winkill tries to kill a window the window won't close so winkill just keeps on trying to kill it and gets stuck in a loop. I've noticed that the install program will have the window's "close" button disabled then it will prompt the user to ensure that closing the window was what they intended to do. The second window will have the same window title as the first. So it looks like you would have to kill the program at a different time or have the script send the "Y" character to click the "Yes" button, meaning yes this is what I intended to do. That would automatilcally close the first window.

I think it is best to kill the window earlier or later in the process if you can.

Link to comment
Share on other sites

If _Singleton("Install.exe",1) = 0 Then Exit
;enter win title, I entered "Microsoft Internet Explorer"... harharhar!
WinKill("Microsoft Internet Explorer", "")
If @error then
ProcessClose("iexplore.exe")
If @error then MsgBox(16,"Error","Falied to close IE. Destroying of Internet Explorer and putting Firefox everywhere is terminated. You will must continue to use IE. :)")
EndIf
MsgBox(64,"The install will now begin")
; blablala

Not tested

i542

I can do signature me.

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...