Sign in to follow this  
Followers 0
Walrus

Run same script some times.

7 posts in this topic

Hi, is there a way to run the same script for example 2 times at the same time?

I mean run script example.exe second time when script is already open (by AutoIt function)

So, for example i'm having 2 scripts:

manager.exe (au3)

script.exe (au3)

In manager.exe i'm having button "Start" with function Run("script.exe") and this is working, but only for one script at same time.

Sorry for my english,

Walrus.

Share this post


Link to post
Share on other sites



Can you show a reproducer? (A short example of code that shows what you try and what is not working?) Because this:

run("notepad.exe")
run("notepad.exe")

... starts two notepads just fine.

1 person likes this

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Func Start()

    run("script.exe")

EndFunc

It it running only 1 script.exe (i'm pressing startbutton 10+times)

Maybe i need open it with admin permissions, can i do it in autoit? Or just #RequireAdmin keyword in script.exe?

Edited by Walrus

Share this post


Link to post
Share on other sites

Do you by chance have this:

_Singleton()

in your code? As, this will only allow 1 instance of a script to run.

1 person likes this

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

You can try this and say me if that work:

Func Start()

    run("script.exe"&" /separate")

EndFunc

This is a windows atribut to run a process on a separate process ID this allow to use different user for the same process. It depend witch kind of process you try to run together with same name.

For exemple if you try this with "Explorer.exe"

You'll have the permition to run Multiple explorer.exe instance. only if you use the "/separate" atribut. Give me feedback plz

Edited by caramen
1 person likes this

Share this post


Link to post
Share on other sites

Ok, i tried it on another pc with admin permissions and all ways are good, thank you for help, all is working fine

@caramen

Now it's working.

Share this post


Link to post
Share on other sites

So plz mark your topic solved :) thx bye

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