Solved

how to call vbs file within vb.net?

Posted on 2006-06-19
7
879 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

14 Experts available now in Live!

Get 1:1 Help Now