Installshield 2013 Installscript MSI: Wrong .msi location during Repair

99封情书 提交于 2019-12-24 09:58:35

问题


I've got a pretty simple installscript MSI project - it copies some files into a folder, updates a few registry keys and that's pretty much it.

When I try to use the Repair function (either by re-launching the installer, or by choosing the app's Modify option under Apps & Features), I get the following message, when it gets to the "Copying new files" stage:

"The feature you are trying to use is on a network resource that is unavailable.

Click OK to try again, or enter an alternate path to a folder containing the installation package 'project.msi' in the box below."

The path in which it looks for the .msi file is %TEMP%\[SOME_RANDOM_HEXADECIMAL_STRING]

This random hexadecimal string doesn't seem to be specifically related to the project. It's neither the Product Code nor the Upgrade Code nor the Package Code.

When I look for it in the registry, I find it in the values of the following keys:

Computer\HKEY_CLASSES_ROOT\Installer\Products\[SCRAMBLED_PRODUCT_CODE]\SourceList\LastUsedSource
Computer\HKEY_CLASSES_ROOT\Installer\Products\[SCRAMBLED_PRODUCT_CODE]\SourceList\Net\3
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\[ANOTHER_SCRAMBLED_PRODUCT_CODE]\SourceList\LastUsedSource
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\[ANOTHER_SCRAMBLED_PRODUCT_CODE]\SourceList\Net\3

Looking at the %TEMP% folder, I can find the .msi file in a folder that has another random hexadecimal string as its name. That folder does not appear in the registry at all.

I don't want my clients to go looking for .msi files every time they want to repair an installation of my product. How can I let the installer know the .msi file's location?


回答1:


The source files you installed from are probably just missing since your temp folder has been cleaned out (where the install originally ran from).

There used to be a cache the whole MSI - feature you could enable on a release-configuration basis (Cache MSI Locally). This would "solve" this problem I believe by caching the whole MSI in a safe location (see section 3). Many do this, despite the increased disk space used.

Another option is to install from an administrative installation (essentially an extract of your setup's files - run via setup.exe /a or msiexec.exe /a MySetup.msi - which has been put available on a network share, always available for repair or modify operations). This is what corporate deployment uses to support repair and modify operations.



来源:https://stackoverflow.com/questions/51078998/installshield-2013-installscript-msi-wrong-msi-location-during-repair

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!