Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 893
  • Last Modified:

how to call vbs file within vb.net?

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")
  • 2
1 Solution
jefmelkenbeekAuthor Commented:
i mean process.start ("file")
Mike TomlinsonMiddle School Assistant TeacherCommented:
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...
lojk.Net and Infrastructure ConsultantCommented:
wouldn't you would normally do

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

Mike TomlinsonMiddle School Assistant TeacherCommented:
Doesn't matter lojk...

If you just did:


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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now