title: AutoIt (AutoItX) on C# Windows 7 App System.DllNotFoundException
body: <p>I have a C# application that uses AutoItX for automation.  This application works fine in my Windows 8.1 x64 environment compiled with Microsoft Visual Studio 2013 release 3.</p>
  
  <p>I pushed a copy of the app code to a bitbucket repository and cloned it to a computer running Windows 7 x64.  AutoItX version 3.14.2 was installed and the 32bit calls were selected.  The application was compiled using Visual Studio 2013 release <strong>4</strong>.  </p>
  
  <p>The app compiled fine, but the first use of the AutoIt functions resulted in an error:</p>
  
  <pre><code>An unhandled exception of type 'System.DllNotFoundException' occurred in AutoItX3.Assembly.dll
  </code></pre>
  
  <p>I tried the following steps.  The app was tested after each of these steps</p>
  
  <ol>
  <li><p>Attempted to register the .dll manually using regsrv32</p>
  
  <p>regsrv32 "C:\Program Files (x86)\AutoIt3\AutoItX\AutoItX3.dll"</p></li>
  <li><p>Uninstalled VisualStudio 2013 R4 and attempted to reinstall VisualStudio 2013 R3 {The installation of R3 failed because it required internet explorer version 10 and version 11 has already been installed on this computer} so R4 was reinstalled</p></li>
  <li><p>Uninstalled AutoIt and reinstalled selecting the 64 bit library preference.  Compiled the app with x64 Platform option</p></li>
  <li><p>Uninstalled AutoIt and reinstalled using the 32 bit library preference
  Compiled the app with the X86 Platform option</p></li>
  <li><p>Manually copied AutoItX3.dll to the C:\windows\System32 directory</p></li>
  <li><p>Manually copied AutoItX3_x64.dll to the c:\Windows\SysWOW64 directory.  Compiled the app for x64 platform</p></li>
  <li><p>Wiped computer clean and reinstalled windows 7, AutoIt (32 bit preference), Visual Studio 2013 R4</p></li>
  <li><p>Installed AutoIt v14</p></li>
  <li><p>Installed the beta version of AutoIt v15</p></li>
  <li><p>Performed a Windows update -  213 updates (!) installed</p></li>
  <li><p>Installed Internet Explorer v11</p></li>
  <li><p>Performed a Windows update - 4 updates installed</p></li>
  <li><p>Installed AutoIt version 3.10.2 that worked on the Windows 8 system</p></li>
  </ol>
  
  <p>I would appreciate suggestions on what to try next.  I'm probably missing something very basic, but I just can't find a solution</p>