Help running script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MAF

    #1

    Help running script

    I am trying to force my machine to run the Cscript engine against a vbs
    script file. Why would the two act differently.

    When I run the following code it does not execute the vbs script the same
    way as the second option.
    scriptConsolePr ocess = new Process();

    scriptConsolePr ocess.StartInfo .FileName = "CScript.ex e";

    scriptConsolePr ocess.StartInfo .Arguments = scriptPath;

    scriptConsolePr ocess.StartInfo .CreateNoWindow = true;

    scriptConsolePr ocess.Start();



    This option works when I have the CScript set as my default engine.

    scriptConsolePr ocess = new Process();

    scriptConsolePr ocess.StartInfo .FileName = scriptPath;



    scriptConsolePr ocess.StartInfo .CreateNoWindow = true;

    scriptConsolePr ocess.Start();


Working...