0

In order to run a kix script you have to put a myScript.kix file in that same directory as kix32.exe then from cmd go to that directory and

Kix32 myScript

Then your kix script will run.

I want to do this in .net programatically. I am not sure the plumbing on how to accomplish this I have this so far but this will only run Kix32.exe where do I put info about myScript?

var process = new Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.FileName = Kix32;
process.Start();
string output = process.StandardOutput.ReadToEnd();
process.WaitForExit();
AGB
  • 2,230
  • 1
  • 14
  • 21
nlstack01
  • 789
  • 2
  • 7
  • 30

1 Answers1

0

You should be able to specify the script in the Arguments property of StartInfo:

process.StartInfo.FileName = "C:\path\to\kix32.exe";
process.StartInfo.Arguments = "myScript";

The combination of the two would look like kix32.exe myScript on the command line.

Cᴏʀʏ
  • 105,112
  • 20
  • 162
  • 194
  • This outputs an error ERROR : FUNCTION without ENDFUNCTION! but kix32.exe myScript works in command line – nlstack01 May 19 '16 at 19:57
  • How can i be certain the cmd line kix32.exe myScript is running from the proper directory – nlstack01 May 19 '16 at 20:16
  • It's very likely that you could specify full paths if you want, with `.FileName = @"C:\full\path\to\kix32.exe"` and `.Arguments = @"C:\full\path\to\myScript"`. If that latter path has spaces in it, you will need add more quotes: `.Arguments = "\"C:\\full\\path\\to\\myScript\""` – Cᴏʀʏ May 19 '16 at 20:18