Jump to content

Question on Multiple Process Checking?


Recommended Posts

Hey Can anyone help me out with some syntax?

I need a function that when my .exe starts it checks to see if one process already exists and if one does it just stop execution of the script?

and

I also need the same function but will continually check for another instance of the process to kill.

The problem is that i have my compiled script running on Startup for our users but if they double click on the program it starts another instance.

Thanks a million guys....

and thanks alot to AutoIt for making my IT job so much easier! :shocked:

James

Link to comment
Share on other sites

Hey Can anyone help me out with some syntax?

I need a function that when my .exe starts it checks to see if one process already exists and if one does it just stop execution of the script?

and

I also need the same function but will continually check for another instance of the process to kill.

The problem is that i have my compiled script running on Startup for our users but if they double click on the program it starts another instance.

Thanks a million guys....

and thanks alot to AutoIt for making my IT job so much easier! :shocked:

James

For checking process

Global $Process="Your name"
While 1
If $Check=ProcessExists($Process)=0 Then
Exit
EndIf
Sleep(1000)
WEnd
oÝ÷ ØZ+*)ex®²Æ®¶­s` ¤vÆö&Âb33cµ&ö6W73ÒgV÷Cµ÷W"æÖRgV÷C°¥vÆR¤bb33c´6V6³Õ&ö6W74W7G2b33cµ&ö6W72ÓFVà¥&ö6W74¶ÆÂb33cµ&ö6W72¤VæD`¥6ÆVW¥tVæ@

For no running twice:

Check _Singleton

What's the use of your program?

Link to comment
Share on other sites

Well i tried and it didn't work, maybe I am not implementing it correctly.

Lets say i have AuthAgent.exe for example, it runs on startup and it runs in the background. I want it so that if a user clicks AuthAgent.exe again, there will not be multiple instances of AuthAgent.exe running. I want to keep the original instance there. Any help?

Link to comment
Share on other sites

Well i tried and it didn't work, maybe I am not implementing it correctly.

Lets say i have AuthAgent.exe for example, it runs on startup and it runs in the background. I want it so that if a user clicks AuthAgent.exe again, there will not be multiple instances of AuthAgent.exe running. I want to keep the original instance there. Any help?

Global $AuthAgent="AuthAgent"
If WinExists($AuthAgent)=1 Then
Exit
EndIf
AutoItWinSetTitle($AuthAgent)

Put that at Beginning of your script.

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