[Mono-list] How to find mono path on windows? Solved! code attached

Xavi de Blas xaviblas at gmail.com
Tue Sep 4 18:04:24 EDT 2007


I managed to do a Batch version using regread:
http://www.robvanderwoude.com/batexamples_r.html#R

i adapted it for echoing only the RegVal, and i called with this .bat:


InstallChronojump.bat
-----------------------------------------------------------
@echo off

::find version

call regread.bat "HKEY_LOCAL_MACHINE\Software\Novell\Mono"
"DefaultCLR" > temp.txt

set /p version=<temp.txt>nul

del temp.txt

::find SdkInstallRoot

call regread.bat "HKEY_LOCAL_MACHINE\Software\Novell\Mono\%version%"
"SdkInstallRoot" > temp.txt

set /p monoPath=<temp.txt>nul

del temp.txt


::Write chronojump.bat

echo "%monoPath%\bin\mono.exe" "chronojump.prg" > chronojump_execute.bat
-----------------------------------------------------------


This way user double click on InstallChronojump.bat and a
chronojump_execute.bat is created with the correct mono path

I hope ot helps


More information about the Mono-list mailing list