Executing a VB Script file from VB.net

G

Guest

I am loading XML data into a SQL Server database using SQLXML with bulkload. I use a VB script file to perorm the load with the map schemas and the XML files. To do the load manually, you just double click on the VB script file which lies in a directory on the hard drive. Now I want to execute this file from a VB application or a Windows service. How do I call, reference or execute the file from VB.net?
 
D

David Williams , VB.NET MVP

You should be able to use Process.Start("SQL.VBS") [Where you replace
"SQL.VBS" with your named .vbs file] to run the script file.

HTH

David
 
G

Guest

Thanks, it works! A simple piece of code, but you saved me a lot of time.

David Williams said:
You should be able to use Process.Start("SQL.VBS") [Where you replace
"SQL.VBS" with your named .vbs file] to run the script file.

HTH

David

J. Kingsley said:
I am loading XML data into a SQL Server database using SQLXML with
bulkload. I use a VB script file to perorm the load with the map schemas and
the XML files. To do the load manually, you just double click on the VB
script file which lies in a directory on the hard drive. Now I want to
execute this file from a VB application or a Windows service. How do I call,
reference or execute the file from VB.net?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top