每次重新安装我的 msi 产品后,添加删除程序都会显示大小增加 [英] Add remove programs show increased size after each REINSTALL of my msi product

查看:18
本文介绍了每次重新安装我的 msi 产品后,添加删除程序都会显示大小增加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的应用程序运行时,它会连接到在线存储库并检查是否有更高版本可用.如果有更高版本可用,它会下载 MSI 并进行升级(即通过使用不同的产品版本进行次要更新).升级完成后,运行正常.

When my application is run, it connects to an online repository and checks if a higher version is available. If higher version is available it downloads the MSI and does an upgrade (i.e do a minor update by using different product version). After upgrade is complete, it runs normally.

问题是,每次升级时,ARP 都会显示我的产品大小增加.每次升级后大小都会累积.我检查了我的应用程序文件夹和其他目标文件夹中所有重新安装的文件,但没有重复文件或额外的日志文件.

THe problem is, ARP shows an increased size for my product each time I upgrade it. THe size accumulates after each upgrade. I checked all the reinstalled files in my application folder and other destination folders, but there were no duplicate files or extra log files.

我正在使用 MsiInstallProduct(msiFile, cmdLine) 执行重新安装.命令行"是:ALLUSERS=1 REINSTALLMODE=vamus REINSTALL=ALL CONFIGURATIONFILE=C:ProgramDatamyapp gsetup.ini

I am using MsiInstallProduct(msiFile, cmdLine) to perform reinstall. 'cmdline' is : ALLUSERS=1 REINSTALLMODE=vamus REINSTALL=ALL CONFIGURATIONFILE=C:ProgramDatamyapp gsetup.ini

我在 Verbose msi 日志中观察到以下可疑内容:

I observed following suspicious things in Verbose msi log:

  1. 在升级过程中,我的应用程序在后台启动一个进程 ngupdate.exe,它使用 2 个 dll(ngcommon.dll 和 ngevent.dll).这可能是 ARP 大小增加的原因吗?

日志片段:

:
MSI (s) (1C:6C) [10:16:21:958]: Executing op: SetTargetFolder(Folder=C:Windowssystem32)
MSI (s) (1C:6C) [10:16:21:958]: Executing op: SetSourceFolder(Folder=1SYSTEM~1|System Folder)
MSI (s) (1C:6C) [10:16:21:958]: Executing op: RegisterSharedComponentProvider(,,File=_B08FC512AED74917BAF4D6EAF379944E,Component={2DE76099-CD98-FD91-F426-2B97BB134A59},ComponentVersion=11.2.0.118,ProductCode={A2A78788-2792-49BF-AF22-5E9296E568F3},ProductVersion=11.20.118,PatchSize=0,PatchAttributes=0,PatchSequence=0,SharedComponent=0,IsFullFile=0)
MSI (s) (1C:6C) [10:16:21:964]: Executing op: FileCopy(SourceName=NGCOMMON.DLL|ngcommon.dll,SourceCabKey=_B08FC512AED74917BAF4D6EAF379944E,DestName=ngcommon.dll,Attributes=512,FileSize=182056,PerTick=65536,,VerifyMedia=1,,,,,CheckCRC=0,Version=11.2.0.118,Language=1033,InstallMode=130023424,,,,,,,)
MSI (s) (1C:6C) [10:16:21:965]: File: C:Windowssystem32
gcommon.dll; Overwrite;  Won't patch;    REINSTALLMODE specifies all files to be overwritten
MSI (s) (1C:6C) [10:16:21:965]: Source for file '_B08FC512AED74917BAF4D6EAF379944E' is compressed
MSI (s) (1C:6C) [10:16:21:965]: Re-applying security from existing file.
MSI (s) (1C:6C) [10:16:21:966]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (s) (1C:6C) [10:16:22:324]: Product: My App. The file C:Windowssystem32
gcommon.dll is being used by the following process: Name: ngupdate , Id 3104.
MSI (s) (1C:6C) [10:16:22:326]: Verifying accessibility of file: ngcommon.dll
MSI (s) (1C:6C) [10:16:22:332]: Executing op: FileCopy(SourceName=NGHELP.CHM|nghelp.chm,SourceCabKey=_C8D0297F24AD4BA5A9D4AAA0D3BAC0CC,DestName=nghelp.chm,Attributes=512,FileSize=90244,PerTick=65536,,VerifyMedia=1,,,,,CheckCRC=0,,,InstallMode=130023424,,,,,,,)
MSI (s) (1C:6C) [10:16:22:333]: File: C:Windowssystem32
ghelp.chm;   Overwrite;  Won't patch;    REINSTALLMODE specifies all files to be overwritten
MSI (s) (1C:6C) [10:16:22:333]: Source for file '_C8D0297F24AD4BA5A9D4AAA0D3BAC0CC' is compressed
MSI (s) (1C:6C) [10:16:22:333]: Re-applying security from existing file.
MSI (s) (1C:6C) [10:16:22:335]: Verifying accessibility of file: nghelp.chm
MSI (s) (1C:6C) [10:16:22:339]: Executing op: SetTargetFolder(Folder=C:Windows)
MSI (s) (1C:6C) [10:16:22:339]: Executing op: SetSourceFolder(Folder=1WINDOW~1|Windows Folder)
MSI (s) (1C:6C) [10:16:22:339]: Executing op: RegisterSharedComponentProvider(,,File=_DDBE1E1CB35A4E12AB1FA25F9D72738D,Component={30F988F9-ED4E-07C5-C3C3-30FECE7447FF},ComponentVersion=11.2.0.118,ProductCode={A2A78788-2792-49BF-AF22-5E9296E568F3},ProductVersion=11.20.118,PatchSize=0,PatchAttributes=0,PatchSequence=0,SharedComponent=0,IsFullFile=0)
MSI (s) (1C:6C) [10:16:22:345]: Executing op: FileCopy(SourceName=NGEVENT.DLL|ngevent.dll,SourceCabKey=_DDBE1E1CB35A4E12AB1FA25F9D72738D,DestName=ngevent.dll,Attributes=512,FileSize=64296,PerTick=65536,,VerifyMedia=1,,,,,CheckCRC=0,Version=11.2.0.118,Language=1033,InstallMode=130023424,,,,,,,)
MSI (s) (1C:6C) [10:16:22:346]: File: C:Windows
gevent.dll;   Overwrite;  Won't patch;    REINSTALLMODE specifies all files to be overwritten
MSI (s) (1C:6C) [10:16:22:346]: Source for file '_DDBE1E1CB35A4E12AB1FA25F9D72738D' is compressed
MSI (s) (1C:6C) [10:16:22:347]: Re-applying security from existing file.
MSI (s) (1C:6C) [10:16:22:347]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (s) (1C:6C) [10:16:22:348]: Product: My App. The file C:Windows
gevent.dll is being used by the following process: Name: ngupdate , Id 3104.
MSI (s) (1C:6C) [10:16:22:350]: Verifying accessibility of file: ngevent.dll
MSI (s) (1C:6C) [10:16:22:354]: Executing op: SetTargetFolder(Folder=C:Program FilesmyappInstall)
MSI (s) (1C:6C) [10:16:22:354]: Executing op: SetSourceFolder(Folder=1INSTALL|Install)
:

  1. 从日志中,在 ProductRegister(...,) 中有一个参数EstimatedSize=1776".这与 ARP 中的大小增加问题有关吗?它有什么作用?

日志片段:

MSI (s) (1C:F8) [10:16:22:449]: Created Custom Action Server with PID 1176 (0x498).
MSI (s) (1C:B4) [10:16:22:475]: Running as a service.
MSI (s) (1C:B4) [10:16:22:477]: Hello, I'm your 32bit Elevated custom action server.
MSI (s) (1C:6C) [10:16:29:059]: Executing op: ActionStart(Name=RegisterProduct,Description=Registering product,Template=[1])
MSI (s) (1C:6C) [10:16:29:059]: Executing op: ChangeMedia(,MediaPrompt=Please insert the disk: ,MediaCabinet=_B80BF92501A9CB366CEFEB8C382A3536,BytesPerTick=0,CopierType=2,ModuleFileName=C:WindowsInstaller1e88d181.msi,,,,,IsFirstPhysicalMedia=1)
MSI (s) (1C:6C) [10:16:29:059]: Executing op: DatabaseCopy(DatabasePath=C:WindowsInstaller1e88d181.msi,ProductCode={A2A78788-2792-49BF-AF22-5E9296E568F3},,,)
MSI (s) (1C:6C) [10:16:29:061]: Verifying accessibility of file: 1e88d180.msi
MSI (s) (1C:6C) [10:16:29:074]: File will have security applied from OpCode.
MSI (s) (1C:6C) [10:16:29:079]: Executing op: ProductRegister(UpgradeCode={81E3FF66-F6BB-49D7-A544-2FF3353BC128},VersionString=11.20.118,HelpLink=https://help.myapp.com/help.asp,,,InstallSource=C:ProgramDatamyapp,Publisher=App Inc.,URLInfoAbout=http://www.myapp.com/us/en/support/contact.html#e-class,,,,,,,Contact=App Inc.,,,,EstimatedSize=1776,,,,)
MSI (s) (1C:6C) [10:16:29:084]: Executing op: ProductCPDisplayInfoRegister()
MSI (s) (1C:6C) [10:16:29:086]: Executing op: ActionStart(Name=PublishFeatures,Description=Publishing Product Features,Template=Feature: [1])
MSI (s) (1C:6C) [10:16:29:086]: Executing op: FeaturePublish(Feature=DefaultFeature,,Absent=2,Component=c-?rk6J{f`&VZ0V-m239QWWxn`42T!4sSaIbbqY$%@s+O!{e,ph8~k4Wa^db=K8^)f(XvC.[Z?4[1voA[7dAyT[uBZFb[ZmBwlaC=j@i2PXJj[=ptVPS'k94kxu_4f(ROJYf+,KX=m(T.q&t7Wyg9RpF3Ov)ytF6lF@f[{1iy=Oh9nB5F`QG66mtjyXbeECC5(@Wm72Bd(t(CJFEv4bPNG&vGUTovbUqYauSv[iXFCNfgIRV@uZPZ4=3!3+7Nq5)taHoE3t`T2w')&LTx?SSIjTvjERXC[Av(gc6=O]f.GGO)Ia7J+o=Q?P~^eP-%,oc)B~[fpsD}Clgdo0g.b07M.@&+utmClhlX.l_E.rMjs$+*P-'?Z.VBu)yyNNnZb@SZ^'yZRu87v3bQ6?h3U&i2tF8Rz[LiYXEG@dDt!eA[iHgB&S*%P99eBR(%Wxg3,*FR%0=5dz^4y&{izS_KJ=(dZo%i0Pboj'$[3&laN']V-wYa.k*@c$jM}`.J[bJ-z@B,Sl^[fIL?H@G*03wMC]@qrXyqA^N)
MSI (s) (1C:6C) [10:16:29:088]: Executing op: ActionStart(Name=PublishProduct,Description=Publishing product information,)
MSI (s) (1C:6C) [10:16:29:088]: Executing op: PackageCodePublish(PackageKey={5C921CC3-02D7-4BDF-BC56-6E2853B5E4FF})
MSI (s) (1C:6C) [10:16:29:088]: Executing op: CleanupConfigData()
MSI (s) (1C:6C) [10:16:29:088]: Executing op: RegisterPatchOrder(Continue=0,SequenceType=1,Remove=0)
MSI (s) (1C:6C) [10:16:29:090]: Executing op: ProductPublishUpdate()
MSI (s) (1C:6C) [10:16:29:091]: Executing op: SourceListRegisterLastUsed(SourceProduct={A2A78788-2792-49BF-AF22-5E9296E568F3},LastUsedSource=C:ProgramDatamyapp)
MSI (s) (1C:6C) [10:16:29:091]: Entering CMsiConfigurationManager::SetLastUsedSource.
:
:

谢谢,库纳尔

推荐答案

Visual Studio 设置项目充满了错误 - 它们一直都是.我强烈建议您立即切换到 Wix,并花时间学习它.你会为自己省去很多悲伤和麻烦.

Visual studio setup projects are full of bugs - they always have been. I seriously suggest you switch to Wix immediately, and spend the time learning it. You will save yourself a lot of grief and problems.

  • Wix tutorial (a well known tutorial for Wix newbies)
  • My suggested Wix "quick start approach" (for the hands-on technies)
  • Code Project: Quick Introduction to Wix (recommend this first to understand scope)
  • An Unofficial History of Wix (to understand where Wix is coming from and what it delivers)
  • Some Facts About Different Installation Products (other products used to create installers)

Wix 工具包中有一个名为 dark.exe 的工具,可让您将现有的 MSI 反编译为 Wix 源 XML.通过一些清理,您可以使用反编译的 XML 源代码作为新 Wix 包的基础(需要一些剪切和粘贴技巧以及 MSI 洞察力).Wix 功能齐全且可靠,而 Visual Studio 项目则不然,您将继续遇到各种限制.

There is a tool in the Wix toolkit called dark.exe that allows you to decompile your existing MSI into Wix source XML. With some cleanup you can use the decompiled XML source as the basis of your new Wix package (somy cut and paste skill and MSI insight necessary). Wix is full-featured and reliable, Visual Studio projects are not and you would continue to hit all kinds of limitations.

对反编译的 VSPROJ 的说明 - 尝试消除所有 GUI 元素并与标准 Wix GUI 类型链接以避免使事情复杂化.请参阅此问题:如何添加可选 UIWiX 工具集本教程.

A note to decompiled VSPROJ - try to eliminate all GUI elements and link with a standard Wix GUI type to avoid complicating things. See this question: How can I add an optional UI to WiX toolset and this tutorial.

在基本层面上,您可以通过插入这个 Wix XML 来获得一个普通的安装程序 Wix GUI:

At a basic level you can get a normal installer Wix GUI by inserting this Wix XML:

<UIRef Id="WixUI_Minimal" />

这会将 MSI 与默认 GUI 链接起来,这对于您的安装程序来说已经足够好了,除非您需要自定义对话框.因此,反编译的 VSPROJ MSI 的工作是找到 GUI 元素,删除整个段,并插入上面的一行 GUI 链接.完毕.您对 Windows Installer 的了解越多,显然就越容易进行此清理.

This links the MSI with a default GUI which is good enough for your installer unless you need a custom dialog. So the effort with the decompiled VSPROJ MSI is to find the GUI elements, delete the whole segment, and inserting the above one liner GUI link. Done. The more you know Windows Installer the easier it is to do this cleanup obviously.

其他几篇带有更多 Wix 建议和链接的文章(大部分较旧):

A couple of other articles with further Wix suggestions and links (most are older):

  • MSI Reference Counting: Two products install the same MSIs
  • MSI vs nuget packages: which are is better for continuous delivery?
  • Wix to Install multiple Applications (more on the management of several related installers)
  • How to implement WiX installer upgrade?
  • Good resources for learning how to create MSI installers from WiX
  • Installer capabilities, WIX vs InstallShield Express
  • How to include wxi file into wxs?
  • WiX tricks and tips

这篇关于每次重新安装我的 msi 产品后,添加删除程序都会显示大小增加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆