Solved

Calling VBS from VB; unable to instantiate WSHController..

Posted on 2004-09-28
1
379 Views
Last Modified: 2012-06-21
Hi,

  I need to call a vbscript from my VB application.
The code is as follows. It builds, but gives a run time error for WSHController ( Run time error '429' : Active X component can't create object.)

/***************/
Dim Controller, RemoteScript
Set Controller = CreateObject("WSHController")
Set RemoteScript = Controller.CreateScript("C:\dummy1\testchat\winsock1\server\mapping.vbs")
RemoteScript.Execute
/*********/

Why does this happen? Should I register some DLLs? Which DLL is required for WSHController to work?
When I try to register wscript with 'wscript - regserver', I get an error "Unknown option '-' specified"

Please suggest a solution.
Regards,
 ink
0
Comment
Question by:ink777
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 31

Accepted Solution

by:
merowinger earned 125 total points
ID: 12177529
why dont call it with wshshell???

dim wshshell
set wshshell = CreateObject("Wscript.Shell")
wshshell.run ("C:\dummy1\testchat\winsock1\server\mapping.vbs")


mero
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month7 days, left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question