Running programs from the \work folder

I saw this from Flying Racoon in answer to another post: “Be it on PC or Xbox,
you cannot write to files distributed within your package - however you can
copy them to the “work” (sandbox) folder upon first launch and then read/write
to the copied file (many add-ons work like this).” The code snippet with the
answer illustrates read/write to a file saving persistant data. What I would
like to do is copy in an executable that functions as a simconnect hub from
the \Community\projectname folder and then fire it off using process.start (or
similar). I can’t see how the exe.xml file would help in this case because the
executable would not be in place when the sim starts. The alternative would be
to have the simconnect hub loaded into a folder that is outside the \Community
folder. However, being fairly new to MSFS development, I understand that
Asobo/MSFS are absolutely and utterly against having any executables anywhere
in the package. If that is correct, how on earth would I get my simconnect hub
into the sim? I can’t really ask a user to go somewhere else and download an
additional package (I understand that is against the rules too).

Hello @HammerStall Maybe I’m missing something but wouldn’t a WASM module be
appropriate for this? Regards, Sylvain

@FlyingRacooon Hello Sylvain I’m working on a code-once, works-for-everything
simconnect hub. If I did this as a WASM module, as I understand it, it would
have to go in the \aircraft\panel folder for each individual aircraft. This
would mean that each time the hub was updated I would have to produce a new
package for each aircraft for download. If I am able to run it externally as
an .exe, any package that contained an updated simconnect hub would, upon
installing it, immediately make that updated hub available to all other
aircraft. Each aircraft contains/would contain a WASM module that communicates
with the simconnect hub. I know it works - I have it working here talking to
three simobjects in MSFS at the same time - but I don’t know if there is a
‘legal’ way of putting the simconnect_hub.exe file into a package.
Installation would preferably be into \community\ folder, but I’m not fussed
if I have to place it into a folder that is at the same hierarchical level as
the MSFS folder. After alll, SimConnect doesn’t care where it’s working from.

Hello @HammerStall A WASM module doesn’t have to be in an aircraft package,
you can create a standalone module. It has limited feature as you will not be
able to render gauges obviously. But it’s perfect for a generic SimConnect
module that you want loaded regardless of the selected aircraft. There is a
SDK sample that demonstrate this: StandaloneModule
(flightsimulator.com)

Regards, Sylvain

@FlyingRaccoon Hello Sylvain I guess that’s going to be the only solution. I
had looked at that example and it’s not what I really wanted because I’ll need
to remove some of the simconnect hub’s I/O functionality to make it MSFS WASM-
compatible. I do appreciate your response and suggestion - thank you.