Solved

Calling VBS from VB; unable to instantiate WSHController..

Posted on 2004-09-28
1
376 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

785 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