How to access different AB installations with ActiveXObject

if I have only one AB installation on a PC I can access AB with

amiBroker = new ActiveXObject("Broker.Application");

But how has the code to be changed when I have more than one installation and I want to start a certain AB installation, eg. because of different settings or different AB versions?

The only way is to run different instances from different Windows USER ACCOUNTS.

Thank you, Tomasz,

I need some more background information. Does this mean, each individual user has to call the setup for exactly one AB installation from his own user account, so that Broker.Application in this particular account is mapped to the exact the instance the user has installed?

No, I did not say anything about setup. Re-read the sentence that I wrote. Your JScript code (new ActiveXObject) connects to FIRST running instance WITHIN given Windows User account.

So, if you run instance A in user account A and instance B in user account B, you will be able to connect to instance A from JScript running in account A, and to instance B from JScript running in account B.

Thanks Tomasz,
so let me recap this to check whether I understood it correctly:
If there is no AB running at all and I want to run script1 on AB instance1 and script2 on AB instance2, then I would first start AB instance1 with userX and AB instance2 with userY. Then I run script1 with context userX and script2 with context userY?
I can also exchange userX and userY in that scenario as long as I keep instance and script tied together because the users are not hard connected to a certain instance?
If so, then I could also run script1 and script2 with a single user by starting AB instance1, running script1, closing AB instance1, starting AB instance2, running AB script2 and closing AB instance2?

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.