LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatin Open Error 2147221164

Solved!
Go to solution

I am trying to troubleshoot an issue that I am having several of my target PCs.  I was given an exe and source code to automate remotely (they want to preserve there current validation).  The exe was built with the ActiveX controls enabled and I have the tlb file.  This process works fine on my laptop (LV2012, Win7 32b, running as admin).  I can get the controls and set values.  I transfer my project and the exe target to another PC (LV2012SP1, Win7 32b, running as admin) and I get a -2147221164 error right at the automation open.vi.  I tried the Knowledge Base registering the tlb file but no luck.  Have updated Win7 and LV2012SP1 to the latest and that didn't help either.  I have tried it on 3 PCs similar to the one I am having trouble with (Same OS and Version of LV) and none of them can successfully run the automation open.vi.

 

To further troubleshoot I built a simple exe on the machine that I am having trouble with and a VI to call it.  Same error.  I moved the whole project back over to my laptop and it works without a hitch.

 

Is there something else I need to have installed to make this work.

0 Kudos
Message 1 of 5
(3,053 Views)

Hello,

 

You mentioned that you have worked through manually registering the .tld file. Did you use the KnowledgeBase article linked below?

http://digital.ni.com/public.nsf/websearch/4F811A9B23F1D46E862566F700615B7A

 

You should not need a full version of LabVIEW installed to run an executable, but there are compatibility technicalities to consider. For example, if your code runs on your LabVIEW 2012 machine, you need the LabVIEW 2012 Run-Time engine on your target machines. Could you please check in NI MAX to see if you have LabVIEW Run-Time 2012 or LabVIEW Run-Time 2012 SP1?

 

 

Regards,

Cameron
0 Kudos
Message 2 of 5
(3,019 Views)

Thanks for the reply.

 

Yes, that was the KnowledgeBase article I used to attempt to maually register the .tlb file.

 

With regard to the second part, the PC that is not working has Full Version of LV on it and was used to builde the executable I am trying to connect to.  I hoped to see if it was some compatiblity issue like you suggested by building my simple test program on the PC I was having trouble with.  I made a simple LV executable that just makes a simple triangle array with some variable to control it on the PC in question with the ActiveX enabled in the build.  Then I made a VI to control the exe using the Automation Open.vi.  I get the error right at the Automation Open.vi.  I copied the entire test setup to my laptop, ran the exe once by itselft, then ran my controlling VI.  Ran perfectly as intended without manually registering anything.  I just selected the .tlb file from its new location on my laptop using Select ActiveX Class ...> Browse.

 

I now have RTE for 2009 SP1 through 2012 SP1 f5.  It does not have 2012 (non SP1).  It also now has 2013 f2.

 

An Update: I loaded LV2013 onto the problem PC, opened, saved, and rebuilt my test setup and still get the error.

 

 

0 Kudos
Message 3 of 5
(3,005 Views)

Hello,

 

Could you please post a VI snippet so we can evaluate the logic behind your ActiveX calls?

 

Also, could you please try running the simple ActiveX/LabVIEW program outlined inthe following NI Community page? I am very interested to see if you are able to run the client program successfully.

 

https://decibel.ni.com/content/docs/DOC-9647

Cameron
0 Kudos
Message 4 of 5
(2,992 Views)
Solution
Accepted by topic author MU123

Update:  I have finally gotten back to trying to solve this problem and with the help of a co-worker, thanks Steve M., figured out what the issue was.  There was only 1 account on the target PC I was having trouble with, Win7 32bit, and it was an administrator.  However I failed to realize that Win7 does not run as administrator even though it is an administrator account unless you specifically tell it to do so.  I got it to work first by turning User Account Control all the way off.  Ran the target exe once and then I got control with my VI.  On another of the target PC's was able to right click, run as Admin, and then my VI took control fine.

 

I knew the LV portion was fine because it worked on my laptop, on which I am the admin and no UAC.  So Win7 was not allowing the ActiveX to register when I ran the exe unless it ran as an admin.  Apparently it will also block your attempts to manually register using the method linked above.

 

Also just realized I misspelled Automation In my initial Post.  Oooops.

0 Kudos
Message 5 of 5
(2,806 Views)