Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Calling VBS from VB; unable to instantiate WSHController..

Posted on 2004-09-28
1
Medium Priority
?
381 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 375 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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

661 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