title: How to find relative path to C:\Inetpub\AdminScripts\ADSUTIL.VBS?
body: <p>IIS 6 and older ships with a utility script called <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d3df4bc9-0954-459a-b5e6-7a8bc462960c.mspx?mfr=true" rel="nofollow noreferrer">ADSUTIL.VBS</a>: </p>
  
  <blockquote>
    <p>Adsutil.vbs is an IIS administration
    utility that uses Microsoft Visual
    Basic Scripting Edition (VBScript)
    with Active Directory Service
    Interfaces (ADSI) to manipulate the
    IIS configuration. This script should
    be run using CScript, which is
    installed with Windows Script Host.</p>
  </blockquote>
  
  <p>In other words, this tool lets you change <a href="http://technet.microsoft.com/en-us/library/cc779862%28WS.10%29.aspx" rel="nofollow noreferrer">IIS metabase</a> settings programmatically, from the command line. </p>
  
  <p>I would like to call this tool from an InstallShield project in order to make some configuration changes to IIS. I am curious if it either legal to re-distribute the script (there is no legal wording inside the source for it) or to simply launch the command via:</p>
  
  <pre><code>CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs
  </code></pre>
  
  <p>and hope that the script exists on disk in that location. </p>
  
  <p><strong>So my question is</strong> - will it always exist in that path above, even if some other websites (inetpub roots) on the machine are located on a non-system drive? It seems all MSDN and other Microsoft KB articles that refer to the ADSUTIL tool do so by using the %SYSTEMDRIVE% path above.</p>
  
  <p>I see that at least <a href="http://community.acresso.com/archive/index.php?t-93165.html" rel="nofollow noreferrer">one other attempt to deal with this</a> by distributing both cscript.exe and adsutil.vbs with their InstallShield projects.</p>
  
  <p>Perhaps there is a registry key or other method to obtain the location of the Inetpub\AdminScripts path?</p>
  
  <p>Maybe I should just write a <a href="http://www.codersource.net/csharp_iis_metabase.html" rel="nofollow noreferrer">C# application that changes the value</a> or <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/4b976f46-3751-4f6b-ab68-5e19fa73a7b1.mspx?pf=true" rel="nofollow noreferrer">my own VBScript</a> and distribute with my own little app instead?</p>