Still not working.<div>I am getting the following :</div><div>MATLAB_ROOT_PATH = [HKEY_LOCAL_MACHINE\SOFTWARE\MathWorks\MATLAB\7.6;MATLABROOT]<br><br><div class="gmail_quote">On Mon, Feb 9, 2009 at 4:28 PM, Eric Noulard <span dir="ltr">&lt;<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">2009/2/9 elizabeta petreska &lt;<a href="mailto:elizabeta.petreska@gmail.com">elizabeta.petreska@gmail.com</a>&gt;:<br>

<div class="Ih2E3d">&gt; Hello<br>
&gt; I am trying to read MatlabRoot from Registry ,so I can use it in my include<br>
&gt; and lib paths.<br>
&gt; like this :<br>
&gt; GET_FILENAME_COMPONENT(MATLAB_ROOT_PATH<br>
&gt; &nbsp;[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT] ABSOLUTE)<br>
&gt; message(${MATLAB_ROOT_PATH})<br>
<br>
</div>I don&#39;t think you need the GET_FILENAME_COMPONENT.<br>
Would yuo try:<br>
<br>
SET(MATLAB_ROOT_PATH<br>
[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT])<br>
MESSAGE(&quot;MATLAB_ROOT_PATH = ${MATLAB_ROOT_PATH}&quot;)<br>
<font color="#888888"><br>
<br>
--<br>
Erk<br>
</font></blockquote></div><br></div>