title: Make .NET Framework 4 wpf application portable or more reliable to install
body: <p>I am required to create a simple application. Since I am good at WPF and I don't know win forms that good I implemented my application by creating a .Net Framework 4.0 WPF project in Visual Studio. Everything works great the application runs like it is supposed to.</p>
  
  <p>Since the application is required to run in multiple platforms (Windows XP and above) I am including the prerequisites when publishing my applications. The prerequisites happen to be:</p>
  
  <ul>
  <li>1)  <a href="http://www.microsoft.com/download/en/details.aspx?id=32" rel="nofollow">WIC (Windows Imaging Component)</a> old computers need that to run the .net framework 4.0 </li>
  <li>2) Windows installer 3.1 (needed in order to install the next prerequisite)</li>
  <li>3) Windows .NET Framework 4.0 Client Profile</li>
  </ul>
  
  <p>If I install those prerequisites then the application runs like it is supposed to. </p>
  
  <p><strong>Now the problem is:</strong></p>
  
  <p>My boss did not approve my application because he tried installing it in a Windows XP machine with SP2 and this are the things that happened:</p>
  
  <p>Step 1) </p>
  
  <pre><code>// first prerequisite (WIC) took less than 1 minute to install everything
  // is working great so far.
  </code></pre>
  
  <p>Step 2)</p>
  
  <pre><code>// second prerequisite (Windows Installer 3.1) takes about 2 minutes to install
  // which is great. After the installation is done the computer needs to be  
  // restarted in order to continue with the installation. Things are not going 
  // that good now but we are still ok...
  </code></pre>
  
  <p>Step 3)</p>
  
  <pre><code>// After the computer is done rebooting it continues with the last prerequisite 
  // (Windows .NET Framework 4.0 Client Profile). That takes 10 minutes to install!!!!
  </code></pre>
  
  <p>Step 4)</p>
  
  <pre><code>// My application has all the prerequisites needed to be installed so it installs in
  // about 1 minute
  </code></pre>
  
  <p>We recorded the time, and the application took about 25 minutes to install from start to finish. The computer where we tested the installation was a virtual computer using 2 cores and 1 GB of memory with 3.1 GHZ. </p>
  
  <hr>
  
  <p>What do you guys recommend in order to speed up this installation? Should I use a different technology such as windows forms using .net 2.0?  It will be nice if I can deploy the application that I have already created. If you guys could help me make this application portable I will really appreciate it. In order to do so I tried building my application with all the required references copied to the output directory. That did not work... Or any ideas of how to make the installation be faster will be of great help as well.</p>