|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Get spawned processThe TN3270 session is opened with a .ws profile and pcomstrt.exe. The process string in the application is this: psSession = New Process psSession.StartInfo.FileName = path\to\pcomstrt.exe psSession.StartInfo.Arguments = "/P="path\to\ws file & " /S=X /Q" The /P specifies the .ws file to load, the /S=X specifies that the session letter should be X, and i forgot what Q is, but if its needed i can look it up quick. This command starts a Windows command prompt to execute pcomstrt.exe, which is a console-based application, and pcomstrt.exe then starts pcsws.exe with the specified params. Because the initial process is already closed, I can't use psSession.Close to close the newly created window, and my attempts to close by Window Title have thus far failed. Is there a way to get the newly spawned process ID? Please note that there are several windows opened at any given time with different session letters, but all the same application - pcsws.exe, making it a little difficult to use GetProcessByName. Kevin wrote:
> This command starts a Windows command prompt to execute pcomstrt.exe, Two quick thoughts that might work.> which is a console-based application, and pcomstrt.exe then starts > pcsws.exe with the specified params. Because the initial process is > already closed, I can't use psSession.Close to close the newly created > window, and my attempts to close by Window Title have thus far failed. > Is there a way to get the newly spawned process ID? Please note that > there are several windows opened at any given time with different > session letters, but all the same application - pcsws.exe, making it a > little difficult to use GetProcessByName. 1. Can you bypass the middle man and start pcsws.exe directly, passing in the appropriate parameters? 2. If you use GetProcessByName on pcsws.exe, you might be able to check the StartInfo property of the Process object and see what Arguments it was started with. Hope this helps Chris Chris Dunaway wrote:
> Scratch Item 2. I just tried it and it does not work.> Two quick thoughts that might work. > > 2. If you use GetProcessByName on pcsws.exe, you might be able to > check the StartInfo property of the Process object and see what > Arguments it was started with. > Yeah there isnt a way to specify the host session session by loading up
pcsws.exe, and this particular application looks for the letter X specifically. Although, I'm hearing rumours that Personal Communications may be going away altogether with my employer moving to a new system, so this may be a moot point anyway. Show quoteHide quote On Dec 28, 11:57 am, "Chris Dunaway" <dunaw***@gmail.com> wrote: > Chris Dunaway wrote: > > > Two quick thoughts that might work. > > > 2. If you use GetProcessByName on pcsws.exe, you might be able to > > check the StartInfo property of the Process object and see what > > Arguments it was started with.Scratch Item 2. I just tried it and it does not work. I think i may have just found a solution..
http://publib.boulder.ibm.com/infocenter/pcomhelp/v5r9/index.jsp?topic=/com.ibm.pcomm.doc/books/html/quick_beginnings09.htm Further review of this (I must admin I haven't read the entire document, so this is new to me) reveals that apparently, pcsws.exe can be started and a session letter specified. I can't test this at the moment, but I will on Saturday, and if it works, I'll close the thread. Thanks! Show quoteHide quote On Dec 28, 5:44 pm, "Kevin" <kmhun***@gmail.com> wrote: > Yeah there isnt a way to specify the host session session by loading up > pcsws.exe, and this particular application looks for the letter X > specifically. Although, I'm hearing rumours that Personal > Communications may be going away altogether with my employer moving to > a new system, so this may be a moot point anyway. > > On Dec 28, 11:57 am, "Chris Dunaway" <dunaw***@gmail.com> wrote: > > > Chris Dunaway wrote: > > > > Two quick thoughts that might work. > > > > 2. If you use GetProcessByName on pcsws.exe, you might be able to > > > check the StartInfo property of the Process object and see what > > > Arguments it was started with.Scratch Item 2. I just tried it and it does not work.
When to use AndAlso vs And ?
Just a Program Premature Ending of App Trying to get started with tables... Beginner help with FolderBrowserDialog check if table is empty VB.Net application deployment GotFocus versus PreviewKeyDown or Other C# function be converted to VB.NET C# function be converted to VB.NET |
|||||||||||||||||||||||