2014-11-13 29 views
0

当我的应用程序运行时,它连接到在线存储库并检查是否有更高版本可用。如果更高的版本可用,它会下载MSI并执行升级(即使用不同的产品版本进行小更新)。升级完成后,它正常运行。添加删除程序显示我的msi产品重新安装后增加的大小

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

我正在使用MsiInstallProduct(msiFile,cmdLine)来执行重新安装。 'CMDLINE' 是: ALLUSERS = 1重建= vamus REINSTALL = ALL的ConfigurationFile = C:\ ProgramData \ MYAPP \ ngsetup.ini

我观察到以下以详细MSI日志可疑的东西:

  1. 在升级期间,我的应用程序在使用2个DLL(ngcommon.dll和ngevent.dll)的后台启动一个进程ngupdate.exe。这是否会成为ARP大小增加的原因?

日志片段:

: 
MSI (s) (1C:6C) [10:16:21:958]: Executing op: SetTargetFolder(Folder=C:\Windows\system32\) 
MSI (s) (1C:6C) [10:16:21:958]: Executing op: SetSourceFolder(Folder=1\SYSTEM~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:\Windows\system32\ngcommon.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:\Windows\system32\ngcommon.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:\Windows\system32\nghelp.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=1\WINDOW~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\ngevent.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\ngevent.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 Files\myapp\Install\) 
MSI (s) (1C:6C) [10:16:22:354]: Executing op: SetSourceFolder(Folder=1\INSTALL\|Install\) 
: 
  • 从日志,在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:\Windows\Installer\1e88d181.msi,,,,,IsFirstPhysicalMedia=1) 
    MSI (s) (1C:6C) [10:16:29:059]: Executing op: DatabaseCopy(DatabasePath=C:\Windows\Installer\1e88d181.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:\ProgramData\myapp\,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[[email protected][=ptVPS'k94kxu_4f(ROJYf+,KX=m(T.q&t7Wyg9RpF3Ov)[email protected][{1iy=Oh9nB5F`QG66mtjyXbeECC5(@Wm72Bd(t(CJFEv4bPNG&vGUTovbUqYauSv[[email protected]=3!3+7Nq5)taHoE3t`T2w')&LTx?SSIjTvjERXC[Av(gc6=O]f.GGO)Ia7J+o=Q?P~^eP-%,oc)B~[fpsD}[email protected]&+utmClhlX.l_E.rMjs$+*P-'?Z.VBu)[email protected]^'yZRu87v3bQ6?h3U&i2tF8Rz[[email protected]!eA[iHgB&S*%P99eBR(%Wxg3,*FR%0=5dz^4y&{izS_KJ=(dZo%i0Pboj'$[3&laN']V-wYa.k*@c$jM}`.J[[email protected],Sl^[[email protected]*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:\ProgramData\myapp\) 
    MSI (s) (1C:6C) [10:16:29:091]: Entering CMsiConfigurationManager::SetLastUsedSource. 
    : 
    : 
    

    感谢, 注:Kunal

    +0

    你编译与维克斯时,InstallShield或其他工具的MSI? –

    +0

    我正在使用VS2005 vdproj来构建我的msi。 – Kunal

    回答

    4

    Visual Studio安装项目都充满了错误 - 他们一直都是。我认真建议您立即切换到Wix,并花时间学习它。你会为自己节省很多的痛苦和问题。

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

    反编译VSPROJ的注意事项 - 尝试消除所有GUI元素并使用标准Wix GUI类型进行链接以避免复杂化。看到这个问题:How can I add an optional UI to WiX toolsetthis tutorial

    <UIRef Id="WixUI_Minimal" /> 
    

    此链接MSI与默认GUI,除非你需要一个自定义对话框这是您的安装不够好:

    在基础层面上,你可以通过将本维克斯XML得到一个正常的安装程序维克斯GUI 。因此,使用反编译的VSPROJ MSI的努力是找到GUI元素,删除整个段,并插入上面的单行GUI链接。完成。你知道Windows Installer越多,显然这个清理工作就越容易。

    一对夫妇有进一步维克斯的建议和链接其他物品(大部分是老年人):

    相关问题