Standard Output Stream of CLI
I am trying to add some kind of Interface class to an existing VB Project in order to be able to acces the IMS services.
My current solution uses the command line interface, which works pretty fine. The only problems I have are related to "im createcontent" and "im createissue". In those cases I want to know the ID of the created objects but the streamreader object in my software seems so be empty (please see code snippet)
VB.NET Code of CmdLineInterface Function:
Private Function RunCommandCom(command As String, arguments As String) As String() Dim p As Process = New Process() Dim pi As ProcessStartInfo = New ProcessStartInfo() Dim output As String pi.Arguments = " " + "/c" + " " + command + " " + arguments pi.FileName = "cmd.exe" pi.RedirectStandardOutput = True pi.CreateNoWindow = True pi.WindowStyle = ProcessWindowStyle.Hidden pi.UseShellExecute = False p.StartInfo = pi p.Start() Using streamReader As System.IO.StreamReader = p.StandardOutput output = streamReader.ReadToEnd() p.WaitForExit() End Using If output Is "" Then Return Nothing Else Return output.Replace(Chr(13), "").Split(Chr(10)) End If End Function
The RunCommandCom() function works fine for querys. Also calling other executables like "ipconfig" works fine. What is the difference when calling "im createcontent"? Is it possible to read back the ID of the created object with this solution?

