title: utilinstall: Access denied when copying folder
body: <p>I'm using installutil to install a service. However, when I copy the entire folder</p>
  
  <pre><code>- msawebservice
      - install.bat
      - MSAGRadWebService
          - MSAGradWebService.exe
  
  - msawebservice - Copy
      - install.bat
      - MSAGRadWebService
          - MSAGradWebService.exe
  </code></pre>
  
  <p>The install.bat in the first msawebservice folder works, but when I run the install.bat in the msawebservice - copy, I get the System.IO.FileLoadException : Could not load file or assembly 'file:Path-to-msawebservice'. So it is trying to reference the old folder. But when I change the original folder name it still works correctly. Here is the bat file:</p>
  
  <pre><code>@ECHO OFF
  
  REM The following directory is for .NET 4.0
  set DOTNETFX4=%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319
  set PATH=%PATH%;%DOTNETFX4%
  
  echo Installing MSAGradWebService...
  echo ---------------------------------------------------
  InstallUtil /i %~dp0\MSAGradWebService\MSAGradWebService.exe
  echo ---------------------------------------------------
  pause
  echo Done.
  </code></pre>
  
  <p>What I have tried:</p>
  
  <ul>
  <li>Unblocking the files</li>
  </ul>