Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Using MSFS2020 (Steam MSFS version = 11.0.282174.99) and Fsuipc7(Version 7.5.4) on primary pc,,   WideClient (version 7.16) on 2nd pc

I have setup the main fsuipc [wideserver] with AutoShutdown=Yes  ( or Apps)  and the wideclient with autoshutdown=yes  ( or app, or appOnly)

On both fsuipc and wideclient I have setup to run a program when MSFS is ready:

[Programs]
RunIf1=READY,HIDE,CLOSE,D:\Prosim737-V3\RunProsim.exe
wideclient.ini
[User]
....
RunReady1=D:\Prosim737-V3\RunProsim.exe
CloseReady1=Yes        ( or Yes, D:\Prosim737-V3\RunProsim.exe

On the fsuipc7/msfs PC everything works fine. The program gets started at the appropriate time ( msfs ready) and closes when MSFS is shutdown
On the wideclient PC the program gets start at appropriate time, however it never gets closed.
Running wideclient with debug I can when wideclient gets the shutdown signal from the wideserver, however it doesn't do anything with it.
It doesn't close the started program nor does it close the wideclient window. 
I have to manually close the wideclient window(, then it closes the launched RunReady program.

(WideClient log excerpt....
797 e:\apps\visualstudioprojects\fsuipcwpfautoprosimmonitor <M1:L0:C1:H310>
797 E:\Apps\VisualStudioProjects\FSUIPCWPFAutoProsimMonitor\runprosim.exe <M1:L0:C1:H310>
....
 91625 Received shutdown offset code = DCBA <M1:L1:C1:H311>
 91625 FS closing down (param=DCBA), disconnecting <M1:L1:C1:H311>
 91625 ********* Interim performance summary ********* <M1:L1:C1:H311>
 91625 Total time connected so far = 76 seconds <M1:L1:C1:H311>

The wideclient window now shows not connected ( trying to reconnect) and continues in that mode until I close the wideclient window.

I must have some sort of configuration mismatch or setting that is not correct, but have tried several combinations. Even tried using a CloseAppsHotKey

Logs and ini settings attached.

 

WideFS-NoShutdown.zip

Posted

Can you check what the actual process name of the prosim process on your client PC is called (using TaskManager) - runprosim.exe may start an exe with a different name. If that is the case, you need to put the actual process name in the CloseReady1 entry, e.g.

CloseReady1=Yes,"<processName>.exe"

From the technical guide:

Quote

Another option, which may be needed with applications which start off as one process (the named EXE in the "Run" line), but then create another process (i.e. run another EXE) of which, of course, WideClient is then unaware. If it is that new process which needs closing, WideClient needs to be told its name. You do this by adding the EXE name (or the whole pathname if there's likely to be any ambiguity), to the Close parameter, after the "Yes", "Kill" or "Last" part.

Also, please try using the Last and Kill keywords (instead off Yes).

John

N.B. Note I am an holiday now and away from my flight PCs so cannot look into this in more detail at the moment (and I don't use or have prosim!).

Posted

Hi John

It is a single process. A program i wrote.

It launches a batch job( cmc /c) to startup prosim. When it closes, it launches a 2nd batch job. Pretty simple,

Has config that has the name of a program or cmd to launch at startup, and one to run when it closes. As I said, the same process runs fine on fsuipc7 on  sim computer.

You could substitute Notepad as the program for wideclient. I'll try kill or last

Posted
3 hours ago, bcars said:

It launches a batch job( cmc /c) to startup prosim. When it closes, it launches a 2nd batch job. Pretty simple,

Has config that has the name of a program or cmd to launch at startup, and one to run when it closes. As I said, the same process runs fine on fsuipc7 on  sim computer.

It may be an issue if its starting other programs, but if its working in FSUIPC it should really work in WideClient. Is it the same program, starting the same  programs as on FSUIPC? If not, you could try that as a test, to make sure.

3 hours ago, bcars said:

You could substitute Notepad as the program for wideclient.

I;m pretty sure that would work - WideClient hasn't changed for many years and this would have been reported earlier (many time!) if this wasn't working. But I will double check this, but, as I said, I cannot do anything now until I am back from mu holidays, in September.

3 hours ago, bcars said:

I'll try kill or last

Ok - let me know how that goes. However, if you use kill, I don't see how your program could run the the 2nd batch job on closing....

Why don't you use FSUIPC / WideClient to start the ProSim modules? Or are you doing it this way to run the 2nd batch script on close?

John

Posted

Hi John:

One issue I found was that in wideClient I had specified autoshutdown instead of allowshutdown,  so things were acting line allowshutdown=no.  Didn't really matter.

I tried the following combinations:   Also used Process Explorer to watch the processes. The RunProsim does get launched as a sub process of WideClient.

FSUIPC                       WideClient                      Result

autoshutdown=Yes    allowshutdown=yes      as expected, 2nd pc shutdown
                                   allowshutdown=App     Wide client shutdown, but program kept running
                                   allowshutdown=AppOnly   neither wideClient nor program shutdown

autoshutdown=Apps allowshutdown=Yes       Wide client stays running, program closes
                                   allowshutdown=App      program closes, wide client keeps running
                                   allowshutdown=AppOnly program closes, wide client remains open

In all cases, (including case where allowshutdown is No) there is never an entry in the wideclient log that shows the program being terminated. (even when wide client closes it)

 

As a test, I tried notepad.exe   with same results (???) 

Quote

Why don't you use FSUIPC / WideClient to start the ProSim modules? Or are you doing it this way to run the 2nd batch script on close?

It launches different batch file on close.  
The startup Batch file  invokes a monitor that waits until the Prosim system module has completely initialized and is ready to accept connections, before it launches the rest of the Prosim modules that handle the various display and ios component.  (similar to the RunReady concept in fsuipc)   

Quote

It may be an issue if its starting other programs, but if its working in FSUIPC it should really work in WideClient. Is it the same program, starting the same  programs as on FSUIPC? If not, you could try that as a test, to make sure.

The program is the exact same exe on both FSUIPC7 version and the WideClient version.

 Puzzling 🙂    Enjoy your Holiday.    

 

WideClient2.zip

Posted

Hi John:

I think I have it resolved.

I was using Notepad.exe as a test as RunReady  it would not close, nor would wideClient.
Watching ProcessExplorer, it seemed that when Notepad.exe was launched from WideClient, there were 2 subprocesses.  One Notepad with no window title, and a 2nd with a window title. This would bear out your previous comments as well as the TechnicalDocument  that if subprocesses, it would not work.  Interesting when I run notepad from command line or from FileExplorer  Open file with Notepad, only a single instance shows in ProcessExplorer.

I changed to use a different program ( VisualSlickEdit)  and ran vs.exe as Run1/Close1 and that seemed to work(both vs.exe and wideClient closed)  I then  added Notepad back as RunReady1 and it closed VS.exe but not notepad nor WideClient. 
Seems that if a Run1/Close1 it works fine.  I then put my RunProsim.exe back in(no change to program)  and it indeed closed and wideClient closed.  So with FSUIPC with AutoShutdown=Yes and WideClient as AllowShutdown=App  it is working. I ran several tests to re-confirm.  In all cases,  if wideClient does not close on its own ( from the DCBA message) Manually closing wideClient does still not close the Run/RunReady programs. Puzzling.

I guess we can close this as working as coded,  not necessarily as designed 🙂   

Thanks for taking the time to add your suggestions and thoughts.   

Posted
13 hours ago, bcars said:

I was using Notepad.exe as a test as RunReady  it would not close, nor would wideClient.
Watching ProcessExplorer, it seemed that when Notepad.exe was launched from WideClient, there were 2 subprocesses.  One Notepad with no window title, and a 2nd with a window title. This would bear out your previous comments as well as the TechnicalDocument  that if subprocesses, it would not work.  Interesting when I run notepad from command line or from FileExplorer  Open file with Notepad, only a single instance shows in ProcessExplorer.

It should still close when using the Last option - and also when using Kill - it is for this that these options are provided!

13 hours ago, bcars said:

Seems that if a Run1/Close1 it works fine.  I then put my RunProsim.exe back in(no change to program)  and it indeed closed and wideClient closed. 

So are you saying that it works when using Run/Close but not when using RunReady/CloseReady? If so, that is very strange asthere is no realdifference, apart from the time when the program is started.

Also, if WideClient can't close a started program, it will not shut down automatically itself.

I will look into this further in September anyway and try to work out what is happening.  I don't think there is much I can do about this though, except maybe clarify things in the documentation.

I will report back sometime in September.

Regards,

John

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.