0

hi....
did anyone know how to run vbscripts in C#?if yes.........please do reply me....

thankyou
regards

Aruna

3
Contributors
7
Replies
8
Views
8 Years
Discussion Span
Last Post by arunaalapati
0

What do you mean by running vbscript in C#?
Do you want to run a vbscript FROM a C# program ? Or do you want your C# program to be able to interpret vbscript in the same way as Word does, as a macro language?

0

What do you mean by running vbscript in C#?
Do you want to run a vbscript FROM a C# program ? Or do you want your C# program to be able to interpret vbscript in the same way as Word does, as a macro language?

i have a vbscript..and i need my C# program to interpret the vbscript.
also tell me how to run a vbscript FROM a C# program........

0

This is how you run a vbs FROM a c# program...

Process scriptProc = new Process();
scriptProc.StartInfo.FileName = @"C:\text.vbs";
scriptProc.Start();
scriptProc.WaitForExit();
scriptProc.Close();

You must use:
using System.Diagnostics;

0

This is how you run a vbs FROM a c# program...

Process scriptProc = new Process();
scriptProc.StartInfo.FileName = @"C:\text.vbs";
scriptProc.Start();
scriptProc.WaitForExit();
scriptProc.Close();

You must use:
using System.Diagnostics;

Then how a c# program can interpret the vbscript?

0

You actually have to do the conversion yourself. It can't do it for you. Maybe if you explained what the VBS does someone can help you.

0

Then how a c# program can interpret the vbscript?

This is more complicated then simply execute a vbscript, or any other program for that matter, outside your application.
I can't help you with just few lines of code.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.