You will need to run each instance as a separate user. Each user must have permission to run the application. It is not necessary to log in/out of each user account to start the process.
You can read the setup requirements of MCO in the Files section of this group for setting up the users. Then just use the built in Windows "runas" command to fire off each process from a single account but running as a different user. http://support.microsoft.com/kb/294676 Keep in mind that if you are using AddToComposite, you will run into trouble whenever you have multiple instances of AmiBroker running against the same database (each will write over the other, last write wins). You can overcome that by generating dynamic composite names (e.g. based on the user name). Mike --- In [email protected], "ozzyapeman" <zoopf...@...> wrote: > > Recently I've been automating some of my optimizations and backtests > using external VBScript. > > When I run Amibroker manually, I can usually run up to 6 separate > instances under a single User, which allows me to run optimizations on 6 > different AFLs simultaneously. But when I try to run 6 different > VBScripts, each calling a unique AFL, they collide which each other, and > cause errors. > > Without logging out, and logging back into windows as a separate User, > how can I automate multiple optimizations using scripting? > > Below is a typical snippet of code. How do I instruct VBScript to call a > unique Broker.Application, so that all scripts do not try to call the > exact same instance of Amibroker? Is this even possible? Thanks for any > input. > > > dim AB > set AB = CreateObject("Broker.Application") > > dim AA > set AA = AB.Analysis > > AB.LoadDatabase( Database ) > AA.LoadSettings( Settings ) > AB.ActiveDocument.Name = "EURUSD" ' Set EURUSD as active document > > > AA.LoadFormula( Formula1 ) ' load formula from > external file > AA.ApplyTo = 1 ' use > current symbol > AA.RangeMode = 3 ' use 'From' > and 'To' dates > AA.RangeFromDate = FromDate > AA.RangeToDate = ToDate > AA.Optimize( 0 ) >
