2

I have 2 computers - a laptop and a PC. Both of them with windows 7 64-bit.

I've registered a dll with an activex control using the cmd command:

c:\windows\syswow64\regsvr32 mydll.dll

in both of the computers, the registration has been made successfully.

Then, I've written a VB script which in its beginning I have this line:

Dim objTest

Set objTest = CreateObject("MyControl.TestClass")

when the name in the () is my activex control.

In the laptop it works fine, in the pc I recieve an error code 429 as mentioned in the title. In both of them I have admin privileges and the laptop has internet access, while the pc do not.

Please help me.

DanielY
  • 1,141
  • 30
  • 58
  • Just create a test project in VS on PC and add reference of `TestClass` and see whether it allows and runs. – bjan Jan 26 '14 at 08:02
  • Works on the laptop, but not the PC. Laptop has internet access, PC does not. I'd start looking there. – Tim Jan 26 '14 at 08:09
  • Well, @Tim, mose of the google results said it has something to do with windows update, but that's a solution I don't have an option to check. Just wondering if there's anything else – DanielY Jan 26 '14 at 08:11
  • @bjan How would I do what you suggest? – DanielY Jan 26 '14 at 08:11
  • Create a console project and add reference of this class then create object and run. If you didn't get this then look for some relevant tutorials – bjan Jan 26 '14 at 09:54
  • Done that, still same error – DanielY Jan 26 '14 at 10:06
  • Your machines have **two** versions of the scripting runtime. If you start it from, say, a .vbs file you'll get the 64-bit version. Which cannot find, nor execute, the 32-bit version of your COM component. You said nothing at all about exactly how you got the .vbs file running so right now this is a guess. – Hans Passant Jan 26 '14 at 12:41
  • 1
    possible duplicate of [How do I run a VBScript in 32-bit mode on a 64-bit machine?](http://stackoverflow.com/questions/2806584/how-do-i-run-a-vbscript-in-32-bit-mode-on-a-64-bit-machine) – Hans Passant Jan 26 '14 at 12:42
  • @HansPassant, What I did in both machines is the following: Opened Microsoft Word, Pressed Alt+F11, that opened a Visual Basic for applications window, then I wrote the code above. In laptop it worked, PC didnt. – DanielY Jan 26 '14 at 12:43
  • @HansPassant How can it be a duplicate of that question if they didn't have the same owner, and not related to the same subject -_- – DanielY Jan 26 '14 at 12:44
  • Hmya, that's what happens when you ask your question this poorly. VBScript of course has nothing whatsoever to do with Microsoft Word. It is called VBA in Office. Not mentioning the Office version is a mistake as well, nobody can tell whether you have the 64-bit version of it. – Hans Passant Jan 26 '14 at 13:04
  • Also, if you're doing VBA please tag your question accordingly. VBA **is not** VB.NET. – Tim Jan 26 '14 at 18:40
  • I've managed to get this work by myself, thank you all – DanielY Jan 27 '14 at 07:57
  • How did you do that? I have the same problem with an application and would really appreciate if you'd publish the solution – Noldor130884 Aug 23 '17 at 07:33

0 Answers0