Solved

how to call vbs file within vb.net?

Posted on 2006-06-19
7
880 Views
Last Modified: 2008-01-09
How can i call or run vbs within vb.net. Like call a Function in vb.net. In vb.net you can add new item vbs file, but i cannot find any information to call a vbs file.
what i need is:
     exp: function "vbs file"
and not:
     procedure.start ("c:\vbs file")
Thks
0
Comment
Question by:jefmelkenbeek
  • 2
7 Comments
 

Author Comment

by:jefmelkenbeek
ID: 16933451
i mean process.start ("file")
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 100 total points
ID: 16934294
Do you mean that you have embedded the .vbs file in your application?...and you want to know how to run that embedded file?

If this is the case, then you need to extract the file and save it to your hard drive.  Then use Process.Start() to run it.  Don't think there is any other way round that...
0
 
LVL 9

Expert Comment

by:lojk
ID: 16934506
wouldn't you would normally do

Process.Start("cscript.exe c:\vbs file")

?
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 16935538
Doesn't matter lojk...

If you just did:

    Process.Start("c:\someScript.vbs")

It would be run with WScript or CScript depending on what was set as the default on that system.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 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…

947 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now