I want to run vbscript file using cscript.exe. i searched a lot but did'nt found any way while i can run my script using cmd with cscript.exe
this is my code
Process p = new Process();
p.StartInfo.Arguments = @"C:\\Program Files\\VDIWorkLoad\\WorkLoadFile\\open test.vbs";
p.StartInfo.FileName = "testing";
p.StartInfo.UseShellExecute = false;
try
{
p.Start();
p.WaitForExit();
Console.WriteLine("Done.");
}
any idea how i can use cscript.exe
You should set the FileName property to the executable you want to run. In your case that would be
cscript.exe
and nottesting
: