title: How get installation path in pkg during installation stage
body: <p>The procedure is like this:</p>
  
  <p>a).I have a pkg package named for example:  abc.pkg.</p>
  
  <p>b).There is a script named preinstall inside abc.pkg. This script is one of the step run during abc.pkg installation stage.</p>
  
  <p>c).The PackageInfo of this abc.pkg file is:</p>
  
  <pre><code>   &lt;pkg-info
        .....
     &lt;relocate&gt;
        &lt;bundle id="xxxx"/&gt;
     &lt;/relocate&gt;
     &lt;scripts&gt;
        &lt;preinstall file="**./preinstall**"/&gt;
     &lt;/scripts&gt;
     &lt;/pkg-info&gt;
  </code></pre>
  
  <p>d).The preinstall is a script which will write something with installation path. So I need pass the installation path(This path is the destination path used selected in UI)to this script</p>
  
  <p>e).The user will double click the abc.pkg file to begin installation.</p>
  
  <p>So my question is:</p>
  
  <p>a).How I can get known the "destination path" during the installation runtime and how pass to my script?</p>
  
  <p>b).My abc.pkg always install to the /Applications. I do not know why it always install to this path?</p>
  
  <p>Thanks!</p>