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

thankyou
regards

Aruna

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?

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........

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;

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?

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.

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 article has been dead for over six months. Start a new discussion instead.