Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Change in source path causes error during upgrade


3 replies to this topic

aarthi_m

aarthi_m
  • Full Members
  • 65 posts

Posted 10 July 2007 - 07:31

I have changed the source path (folder where the msi resides) between 2 versions. When i upgrade from the previous version to the new version where the source path has changed, the upgrade prompts for source as it is not able to find the msi in the old source path.

This happens when the upgrade is trying to install files which are introduced in the new version.

The old source path got cached in the registry during the install and upgrade refers to that path and hence fails to find the files.

How can i change the sourcelist or the sourcedir so that upgrade looks at the new path?
Is there any way to solve this problem?



akerl

akerl
  • Full Members
  • 104 posts

Posted 11 July 2007 - 12:24

I think that you make a small- or minor-update. Make sure, that the recache flag (v) is set in the reinstall option. Additionally make sure that the package names (old and new msi) are the same. By default it is possible to make the update from a new path, but it isn't possible to change the filename.

Edited by akerl, 11 July 2007 - 12:25.

Andreas Kerl

Inside Windows Installer 4.5
ISBN 3-86645-431-7


aarthi_m

aarthi_m
  • Full Members
  • 65 posts

Posted 11 July 2007 - 13:32

Thanks. I have the flag (v) set and the name of the msi has not changed. What has changed is the folder in which the msi resides. Is there any way of updating the source list during an upgrade?

Is it recommended to change the source list maintained the registry for this product at the start of upgrade?


akerl

akerl
  • Full Members
  • 104 posts

Posted 11 July 2007 - 17:42

Normally it isn't necessary to change the cached sourcedir, but it is possible. There are sourcelist functions in the Windows Installer-API. See http://msdn2.microso...y/aa370867.aspx. Following you'll find a small script. You need the ProductCode and the installation context:

CODE
const msiInstallSourceTypeNetwork = 1
const msiInstallContextUserManaged = 1
const msiInstallContextMachine = 4

const ProductCode = "{1C9417DB-C6F8-4AAD-A77C-CB79F36C4891}"
const PackagePath = "\\earth\Shared\LUA"

Dim installer, product
Set installer = CreateObject("WindowsInstaller.Installer")
Set product = installer.Product(ProductCode, "", msiInstallContextMachine)
product.SourceListClearAll msiInstallSourceTypeNetwork
product.SourceListAddSource msiInstallSourceTypeNetwork, PackagePath, 0


But it is strange, that the update require access to the source. Is the update package valid? Is ist possible to start the update when the policy EnforceUpgradeComponentRules or the property MSIENFORCEUPGRADECOMPONENTRULES is set? Normally you'll find infos about source access in the log (/l*vx). Look four SourceMgmt.

Hope this help.

Andreas Kerl

Inside Windows Installer 4.5
ISBN 3-86645-431-7