Nicholas,
Thanks for the quick reply. here is what I have....
ProcessStartInfo psi = new ProcessStartInfo(Server.MapPath("render.vbs"));
psi.UseShellExecute = false;
psi.Arguments = ExamID.ToString() + " compexam.xsl";
Process.Start(psi);
when stepping thru the previous code, an error is encountered that states
"The specified executable is not a valid Win32 application"
and when this code is executed, all that happens is a beep. The code in
render.vbs is ...
Option Explicit
MsgBox("hello world") //this is just to test the execution of the
vbs file
using (Process oProc = new Process())
{
oProc.StartInfo.FileName = Server.MapPath("render.vbs");
oProc.StartInfo.Arguments = ExamID.ToString() + " compexam.xsl";
oProc.Start();
oProc.WaitForExit(10000);
}
Thanks for you input,
Jim
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:03**********************************@microsof t.com...
Jim,
Yes, you can just use the Process class and pass the path to the script
and it should execute it.
You might want to consider translating the script into C#, as it might
make maintaining the code easier.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Jim Rasmussen" <jr********@idealas.comwrote in message
news:O1**************@TK2MSFTNGP05.phx.gbl...
>>I am trying to run/execute a .vbs file from c# as a process. Is this
possible? If so, how.
TIA
Jim