Jump to content

Run one instance of Process per User..?


DEVIOUZ
 Share

Recommended Posts

Is there a code to make your compiled script.exe able to only run in one instance for each logged on user..??

* So if user 1 has process C:\script.exe already running, and user 1 tries to run the script.exe again the 2nd instance closes.

* So if user 1 has process C:\script.exe already running and user 2 loggs in he can still run C:\script.exe but in only one instance like above.

* So If both users are logged on at the same time, they can both simultaneously run C:\script.exe but in only one instance for each user.

Is this possible at all..??

what would the code look like for this type of parameter..??

Thanks in advance for anyones help..

Link to comment
Share on other sites

$g_szVersion = "My Program!"
If WinExists($g_szVersion) Then
    Exit; It's already running
EndIf
AutoItWinSetTitle($g_szVersion)

I got this from a user in this forum, i dont remember who, but it was very usefull to me.

if I remember i will post his nickname

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
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...