Sign in to follow this  
Followers 0
jero1987

Question on Multiple Process Checking?

7 posts in this topic

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

Share this post


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

Share this post


Link to post
Share on other sites

Thank you Very Much for your quick response!

The program takes a network authentication program, saves user credentials, and does task such as auto log on, and a whole host of other things.

Thank you very much!

Share this post


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

Share this post


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

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