?
Solved

how to call vbs file within vb.net?

Posted on 2006-06-19
7
Medium Priority
?
889 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 400 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
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 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…
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

770 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