I have an .net C# Winforms project which works fine.
What I want to do is create a process which executes a VB script. I already accomplished that with the following code:
string ScriptName = "myScript.vbs";
Process ScriptProcess = new Process();
ScriptProcess.StartInfo.FileName = @ScriptName;
ScriptProcess.StartInfo.WorkingDirectory = @"C:\scripts\";
ScriptProcess.StartInfo.Arguments = string.Format("\"{0}\" \"{1}\"","Arg1","Arg2");
ScriptProcess.Start();
ScriptProcess.WaitForExit();
ScriptProcess.Close();
The arguments are passed to the 'myScript.vbs' and processed. However I wanted to manipulate e.g. a label in my c# Winform to display the result by using this vbs script. Therefore I somehow need to pass the control to it.
How can I do this?
I haven't found out a solution for that and I hope you can give me a hint.