title: InstallScript project giving Error 1706 when upgrading
body: <p>I have an InstallScript project written from scratch in InstallShield 2010. It contains, amongst other things, three native InstallShield objects and four InstallShield Merge Module Holder Objects which wrap MSM files.</p>
  
  <p>When I originally tested the project, it installed fine on a clean environment, but when I tried upgrading to a newer version, each of the four Merge Module Holder Objects produced an "Error 1706. No valid source can be found for product XXXX" message.</p>
  
  <p>I did some digging on the net and found that this is a Windows Installer error, and it occurs because the MSI file has to exist on the machine even after the original install media is gone. The recommended way to ensure that is to tick the "cache the msi package locally" checkbox in the Merge Module Holder Object property dialog.</p>
  
  <p>I ticked that box for all four merge modules and re-tested, but that did not solve the problem. I then looked at where these merge modules were actually being put on the hard disk. The property dialog said <code>&lt;DISK1TARGET&gt;</code>, which resolves to <code>C:\Program Files\InstallShield Installation Information\</code><em>{Product GUID}</em> at runtime. Looking at the test machine, it seemed as though all four merge modules were writing to the same place, thereby overwriting each other's MSI files.</p>
  
  <p>To get round that, I edited each merge module to cache itself to a unique path, <code>&lt;DISK1TARGET&gt;\</code><em>{Name}</em>. I compiled and tested again, and I can see that each merge module does now indeed save itself to a unique subfolder. However, all four Error 1706 messages are <em>still</em> appearing when I upgrade.</p>
  
  <p>Does anyone have any ideas? I'm sure I'm missing something obvious, but it doesn't appear to be documented anywhere. :-)</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>According to lots of posts on InstallShield forums, it appears that InstallShield generates a brand new product GUID for each embedded MSI every time it builds the InstallScript project. During the update process, the InstallShield engine overwrites each MSI file cached on the target machine with the newer version, but when it comes to execute them, Windows Installer says "hey, this is a new product, where's the old product's MSI so that I can uninstall it?", hence the error.</p>
  
  <p>Is it possible to tell InstallShield to not re-generate the product GUID for each embedded MSI on every build? Surely this behaviour makes a mockery of the whole idea of embedding merge modules into InstallScript projects? :-(</p>