Solved

how to call vbs file within vb.net?

Posted on 2006-06-19
7
883 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
[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
  • 2
7 Comments
 

Author Comment

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

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 86

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

749 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