Automating Bartender Via Dcom
I am automating BarTender from VBScript from the machine where it is installed:
Set btApp = CreateObject("BarTender.Application") btApp.Quit 1Everything works fine.
Now I'm trying to run it from another machine:
Set btApp = CreateObject("BarTender.Application", "bartender.mydomain.local") btApp.Quit 1where "bartender.mydomain.local" is the network name of the machine where BarTender is installed.
I get the following message:
--------------------------- Windows Script Host --------------------------- Script: D:\Work\BarTender\test02.vbs Line: 1 Char: 1 Error: ActiveX component can't create object: 'BarTender.Application' Code: 800A01AD Source: Microsoft VBScript runtime error --------------------------- OK ---------------------------What's wrong?
-
You need to have BarTender installed on the local machine where your application is running.
0 -
Legacy Poster
★ BarTender Hero ★
Thank you!
Now I'm getting the following message:--------------------------- Windows Script Host --------------------------- Script: D:\Work\BarTender\test02.vbs Line: 1 Char: 1 Error: Permission denied: 'CreateObject' Code: 800A0046 Source: Microsoft VBScript runtime error --------------------------- OK ---------------------------
0 -
Do you have BarTender installed on the same computer? Is the installed BarTender activated as Automation edition or higher, or running as Trial within the trial period? If no to both of these then that is why it is not working. The second parameter in the CreateObject call should not be there. It should only be: Set btApp = CreateObject("BarTender.Application")
0 -
Legacy Poster
★ BarTender Hero ★
You are wrong. The second parameter should be there, as long as I'm trying to run BarTender from another machine (as I wrote in the very first message).
Please see here:Syntax
CreateObject(servername.typename [, location])
Arguments
servername
Required. The name of the application providing the object.
typename
Required. The type or class of the object to create.
location
Optional. The name of the network server where the object is to be created.
This technology is called DCOM, in contrast to what you are talking about, COM.0 -
Legacy Poster
★ BarTender Hero ★
By the way, your previous advice helped me. Now I'm expiriencing some sort of permission issue. 0 -
We don't support DCOM.
0 -
Legacy Poster
★ BarTender Hero ★
What exactly do you mean:
1) The BarTender COM object does not support DCOM
or
2) You do not provide technical support about using the BarTender COM object in that way?
If (1), then you are wrong. The object doesn't even know than it is being created at the command of a process running on another machine. It is being created by the DCOM system on the local machine.
If (2), then it's a pity.0 -
I believe that although theoretically possible, as you already allude to, assuming you overcome the permissions spider's web, but that there might still remain some BarTender specific reasons as to why this will not work as you hope. I'm going from multi-year old memory here so cannot give precise details.
In any case, we don't provide technical support for this should you persist in trying.
0 -
Legacy Poster
★ BarTender Hero ★
I have succeeded!!!
Firstly, I added myself to Distributed COM Users security group on the target machine.
Secondly, on the target machine in dcomcnfg.exe at My Computer level, I gave all Launch and Activation Permissions to myself (see the attached screenshot).0 -
Legacy Poster
★ BarTender Hero ★
The following code:
Set btApp = CreateObject("BarTender.Application", "bartender.mydomain.local") MsgBox btApp.Version btApp.Quit 1
outputs the following now:
--------------------------- --------------------------- 9.01 --------------------------- OK ---------------------------
9.01 is the BarTender version installed on the server (bartender.mydomain.local). The computer where I run the script from, has version 10.1 installed.
0 -
Legacy Poster
★ BarTender Hero ★
I've noticed that BarTender even doesn't have to be installed on client machine.
This small registry setting is enough:Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Bartender.Application] [HKEY_CLASSES_ROOT\Bartender.Application\CLSID] @="{B9425246-4131-11D2-BE48-004005A04EDF}"
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
11 commentaires