I find the binfmt-misc support to be mainly controlled by distro things, so usually for me invoking ./program.exe will wind up using the archaic mono installed in /usr. If I were you I'd stick to running mono apps by calling "mono program.exe args".
One possibly mad idea if the subprocess was a c# one would be to load and invoke the main method of the exe in a new appdomain.. mad I know.. :) On 6 June 2013 11:36, Miljenko Cvjetko <mcvje...@holisticware.net> wrote: > Hi > > Maybe You should try > > 1. wrap in a shell > 1. create shell file utility (note no exe extension) > #!/bin/sh > /usr/bin/mono $SOMEPATH/utility.exe "$@" > 2. chmod +x utility.exe > 2. register exe as non-native binary > 1. as root turn on the binfmt module > modprobe binfmt > 2. change /etc/fstab file: > binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc none > 3. run the following command on boot > echo ':CLR:M::MZ::/usr/bin/mono:' > > /proc/sys/fs/binfmt_misc/register > 4. mark your .exe files as executable in the filesystem as well: > this is like step 1.2 > > > > http://www.mono-project.com/Guide:Running_Mono_Applications > > cheers > > mel > > <http://www.mono-project.com/Guide:Running_Mono_Applications> > On 2013.06.06 12:08, Sergey Khabibullin wrote: > > Hello, I am trying to start a process in my application. > > Process.Start("utility.exe", "my argument list"); > > > > As you see the "utility.exe" is in the same directory as the application > itself. > Works fine for Windows and some Linux distros. But in other distros I can't > start > > the utility just by "utility.exe", and I forced to use "mono utility.exe". I > belive this behaveour > is because of that in some distros mono binaries registered as executable > files, and in others not. > > > Obviously I can't force all users to use "Proper Linux Distro", and I can't > always use "mono" prefix, > > or I lose the Windows platform. Is there any solution to this problem? > > > > _______________________________________________ > Mono-list maillist - > Mono-list@lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-list > > > > -- > Miljenko Cvjetko dipl.ing. ET > Direktor/CEO > Projektant rješenja/Solution Architect > Razvojni programer/Senior developer > Voditelj projekta/Project Manager > > IX južna obala 13 > Kajzerica Zagreb > T: 385 1 7775555 > M: 385 91 557 447 3 > F: 385 1 7779556 > e: mcvje...@holisticware.net > w: http://holisticware.net > > > _______________________________________________ > Mono-list maillist - Mono-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-list > >
_______________________________________________ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list