How do i call mono addon to run an exe? [Solved]

Hi All,

is anyone using mono? i would like to use it to call m2strm.exe to create strm files from an m3u. i have it working in win10 and it works well, and the read me suggests it is fully mono compatible, so am trying to get it working on my N2+

i found a copy of mono that runs as a service on CE matrix ( and have it installed.

i tried running from ssh mono /storage/path to m2strm.exe /C which should create a config file for m2strm.exe but nothing happens, there is no error so it seems to accept the command ‘mono’

am i doing something wrong, do i need to call it in a different way?


For fun I tried to build this with dotnet and it works fine, but the issue you pointed out is in the source. The assumes that the program runs as a a standalone app and the parameters are wrong when it spawns itself. If you run /C a second time it should work.

Hi Thanks for the reply, i tried running the commmand twice, and variations, but no change and still no config file, see below for all i tried, did i misunderstand your suggestion?

CoreELECN2PlusOffice:~ # mono /storage/VOD/m2strm/m2strm.exe /C
CoreELECN2PlusOffice:~ # /C
-sh: /C: No such file or directory
CoreELECN2PlusOffice:~ # mono /storage/VOD/m2strm/m2strm.exe /C
CoreELECN2PlusOffice:~ # mono /storage/VOD/m2strm/m2strm.exe /C
CoreELECN2PlusOffice:~ # mono /storage/VOD/m2strm/m2strm.exe /C /C
CoreELECN2PlusOffice:~ #

I meant the full command with the /C again but maybe try from /storage/VOD/m2mstrm

thanks, i did try that, but still no config :frowning:

could it be getting confused with paths? -

i am running CE off SD, but also CE is installed to emmc (emmc not big enough hence moving to SD), and i did have some issue with smb were the shares where taking me to emmc not SD, and the custom mapping i had for ‘storage’ in smb was taking me to the CE partition with the dtb in. i fixed the SMB shares by adding and below entry for coreleec to samba conf and mapping storage to ‘storage partition’ - after that ‘storage partition’ smb share takes me to the ‘live’ sd storage partion, but another share poped up that i didnt configue in conf - ‘storage’ that goes to the emmc storage partition.

path = /COREELEC
available = yes
browsable = yes
public = yes
writable = yes
root preexec = mkdir -p /COREELEC

Do other parameters work like /G /V and /H

i will check and update - for sure /? is not working for me

That won’t be necessary, it looks like you have another problem with mono or the app.

none of those work. i just tired on a seperate (s905x) box to rule out anything funky with paths but same result. in m2strm folder there are two m2strm.exe - one in the root of the folder with other files then a folder m2strm with another m2strm.exe in and different files. i tried calling both. see below most recent attmept calling m2strm in the root not sub folder - fyi i i also since installed Thoridia NET and mono tools and tried again but no change

CoreELECM8sAlfie:~ # mono /storage/VOD/m2strm.exe /C
CoreELECM8sAlfie:~ # mono /storage/VOD/m2strm.exe /C
CoreELECM8sAlfie:~ # mono /storage/VOD/m2strm.exe /H
CoreELECM8sAlfie:~ # mono /storage/VOD/m2strm.exe /V
CoreELECM8sAlfie:~ # mono /storage/VOD/m2strm.exe /G

i did notice there is no settings.xml in tools.mono in addon data folder - is this expected?

also i think there may be a path issue and getting not found - see below. the path does exist

-sh: /usr/bin:/usr/sbin:/storage/.kodi/addons/tools.ffmpeg-tools/bin:/storage/.kodi/addons/tools.mono/bin: No such file or directory

No idea, I know netcore not mono

OK NP - thanks for trying to help, i guess i may need to look for different solution convert to strm on the box. looking to get it totally automated for the couple of boxes i have that i take to other places that don’t use my shared SQL…

think i may be getting closer to the issue, maybe screwy install of mono… looking at why path gave file not found, i spotted a file in bin ‘mono’ that is 0kb. i unzipped the addon that i installed, then the xz file and noted the mono in bin as around 3mb. dropped that to bin on N2 and tried running the commands again. now i get something! a bunch of errors but i can see it is trying to run mono but failing with dll not found issue. in process of copying the full extract of the xz file from PC to N2, but it says 1 day left!! doh Microsoft time, don’t believe that for one minute!

Yep that’s fixed it…m2strm.exe now running on my N2!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.