title: ActiveX, installation doesn't work
body: <p>I want to create and deploy an ActiveX plugin, somethign really small. I just want to display a message box.</p>
  
  <p>I've created a library project for it and compile it to a DLL. The plugin works when I register the dll via command line (<code>regasm</code>) on one machine.</p>
  
  <p>So I now need to create an installer, put it inside a CAB file and sign it.</p>
  
  <p>I've installed Visual Studio 2008 to use Setup Project project (but I can use the InstallShield from 2010+ if anyone can explain how to do it). I add my dll to the Application Folder and mark it as <code>Register = vsdrpCOM</code> and I build it and I get a .msi and .exe.</p>
  
  <p>I think I only need the msi file and not the exe. I created a setup.inf file with the fallowing content :</p>
  
  <pre><code>[version]
  signature="$CHICAGO$"
  AdvancedINF=2.0
  
  [Setup Hooks]
  hook1=hook1
  
  [hook1]
  run=msiexec.exe /i "%EXTRACT_DIR%\ActiveInstaller.msi" /qn
  </code></pre>
  
  <p>To build the .cab file I use the command makecab /f build.ddf.
  Here is my .ddf file :</p>
  
  <pre><code>.Set DiskDirectoryTemplate=;
  .Set CabinetNameTemplate=ActiveInstaller.cab
  ../ActiveInstaller.msi
  ../setup.inf
  </code></pre>
  
  <p>This generated the cab file. Now I need to sign it. At the moment I used a self signed certificate that I generated and installed on my pc (when I check the sign cab file, windows says it's safe). I use another command line which is <code>signtool signwizard</code> (I also try to sign it manually from <a href="https://stackoverflow.com/questions/84847/how-do-i-create-a-self-signed-certificate-for-code-signing-on-windows">here</a>). Then the file is signed and I upload it to my website, I launch the website, I'm prompted to install the plugin and I install it.</p>
  
  <p>But then, it does not work, I have no idea why. I've tried so much stuff, with different installer, different options, different inf file, different signing method, etc.</p>
  
  <p>The only tutorial that I found are at least three years old, I don't know if anything as changed since they were wrote.
  Here are the main link that I used : <a href="http://blogs.msdn.com/b/asiatech/archive/2011/12/05/how-to-develop-and-deploy-activex-control-in-c.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/b/asiatech/archive/2011/12/05/how-to-develop-and-deploy-activex-control-in-c.aspx</a> and another one <a href="http://www.codeproject.com/Articles/24089/Create-ActiveX-in-NET-Step-by-Step" rel="nofollow noreferrer">http://www.codeproject.com/Articles/24089/Create-ActiveX-in-NET-Step-by-Step</a></p>
  
  <p>SOLUTION : </p>
  
  <p>So, everything Pepo said is true so I marked his answer as accepted.
  I also found someone who the whole source code (including how to create the .exe which runs the msi) <a href="http://go4answers.webhost4life.com/Example/best-way-deploy-activex-component-61236.aspx" rel="nofollow noreferrer">here</a>.</p>